mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-25 00:00:05 +03:00
Add disallowed types and methods in Clippy
This commit is contained in:
parent
b1898f6d8b
commit
a1f0eaab54
|
@ -75,6 +75,8 @@ unstable_features = "forbid"
|
|||
|
||||
[workspace.lints.clippy]
|
||||
empty_loop = "forbid"
|
||||
disallowed-types = "deny"
|
||||
disallowed-methods = "deny"
|
||||
infinite_loop = "deny"
|
||||
mem_forget = "deny"
|
||||
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