diff options
| author | 2023-04-28 01:36:44 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:36:44 +0800 | |
| commit | dd84b9d64fb98746a230cd24233ff50a562c39c9 (patch) | |
| tree | b583261ef00b3afe72ec4d6dacb31e57779a6faf /clippy.toml | |
| parent | 0b46fcd72ac34382387b2bcf9095233efbcc52f4 (diff) | |
| download | HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.tar.gz HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.zip | |
Diffstat (limited to 'clippy.toml')
| -rw-r--r-- | clippy.toml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 0000000..d516089 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,14 @@ +disallowed-types = [ + # Use turbo_tasks_hash::{DeterministicHash, Xxh3Hash64Hasher} instead. + "std::collections::hash_map::DefaultHasher", +] +disallowed-methods = [ + # We forbid the use of the Hasher::hash trait item to prevent misuse of + # hashing Vcs. Vcs must themselves be hashable (to be useable in maps and + # sets), but the hash **is not stable** and must not be observed. + # Use Xxh3Hash64Hasher::write with value's bytes directly. + "std::hash::Hasher::hash", + # We forbid the use of VecDeque::new as it allocates, which is kind of unexpected + # Instead use VecDeque::with_capacity to make it explicit or opt-out of that. + "std::collections::VecDeque::new", +] |
