mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-18 06:58:10 -05:00
Add disallowed types and methods in Clippy
This commit is contained in:
parent
b1898f6d8b
commit
a1f0eaab54
2 changed files with 15 additions and 0 deletions
|
@ -75,6 +75,8 @@ unstable_features = "forbid"
|
||||||
|
|
||||||
[workspace.lints.clippy]
|
[workspace.lints.clippy]
|
||||||
empty_loop = "forbid"
|
empty_loop = "forbid"
|
||||||
|
disallowed-types = "deny"
|
||||||
|
disallowed-methods = "deny"
|
||||||
infinite_loop = "deny"
|
infinite_loop = "deny"
|
||||||
mem_forget = "deny"
|
mem_forget = "deny"
|
||||||
dbg_macro = "warn"
|
dbg_macro = "warn"
|
||||||
|
|
13
clippy.toml
Normal file
13
clippy.toml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
disallowed-types = [
|
||||||
|
# Inefficient. Use `.queue(…)` instead.
|
||||||
|
"crossterm::style::Stylize",
|
||||||
|
"crossterm::style::styled_content::StyledContent",
|
||||||
|
]
|
||||||
|
|
||||||
|
disallowed-methods = [
|
||||||
|
# We use `ahash` instead of the default hasher.
|
||||||
|
"std::collections::HashSet::new",
|
||||||
|
"std::collections::HashSet::with_capacity",
|
||||||
|
# Inefficient. Use `.queue(…)` instead.
|
||||||
|
"crossterm::style::style",
|
||||||
|
]
|
Loading…
Reference in a new issue