From cf735b4278cfcdb85be85a038302a8950c707cce Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 12 Mar 2026 22:06:29 +0300 Subject: [PATCH] chore: enforce `rustc_hash` over std hashers Signed-off-by: NotAShelf Change-Id: I228093b5da57d6fa3a6249e06de2f5776a6a6964 --- .clippy.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.clippy.toml b/.clippy.toml index 0a3de0a..f2cb4f3 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,3 +1,9 @@ +avoid-breaking-exported-api = false +cognitive-complexity-threshold = 30 +too-many-arguments-threshold = 12 +upper-case-acronyms-aggressive = true +check-inconsistent-struct-field-initializers = true + await-holding-invalid-types = [ "generational_box::GenerationalRef", { path = "generational_box::GenerationalRef", reason = "Reads should not be held over an await point. This will cause any writes to fail while the await is pending since the read borrow is still active." }, @@ -13,3 +19,9 @@ disallowed-methods = [ { path = "once_cell::unsync::Lazy::new", reason = "use `std::cell::LazyCell` instead, unless you need into_value" }, { path = "once_cell::sync::Lazy::new", reason = "use `std::sync::LazyLock` instead, unless you need into_value" }, ] + + +disallowed-types = [ + { path = "std::collections::HashMap", reason = "Use `rustc_hash::FxHashMap` instead, which is typically faster." }, + { path = "std::collections::HashSet", reason = "Use `rustc_hash::FxHashSet` instead, which is typically faster." }, +]