Add disallowed types and methods in Clippy

This commit is contained in:
mo8it 2024-08-25 23:54:04 +02:00
parent b1898f6d8b
commit a1f0eaab54
2 changed files with 15 additions and 0 deletions

View file

@ -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
View 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",
]