diff --git a/Cargo.toml b/Cargo.toml index 5eb25b49..b332f40b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..81e372a7 --- /dev/null +++ b/clippy.toml @@ -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", +]