chore: enforce rustc_hash over std hashers
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I228093b5da57d6fa3a6249e06de2f5776a6a6964
This commit is contained in:
parent
530873b7a3
commit
24b681453e
1 changed files with 12 additions and 0 deletions
12
.clippy.toml
12
.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 = [
|
await-holding-invalid-types = [
|
||||||
"generational_box::GenerationalRef",
|
"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." },
|
{ 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::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" },
|
{ 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." },
|
||||||
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue