forked from ChainSafe/forest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clippy.toml
25 lines (21 loc) · 1.3 KB
/
.clippy.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Banned in #2454, trading security/being idiomatic for speed
[[disallowed-types]]
path = "std::collections::HashMap"
reason = """the standard library hasher is secure by default, but not very fast.
use ahash::HashMap instead."""
[[disallowed-types]]
path = "std::collections::HashSet"
reason = """the standard library hasher is secure by default, but not very fast.
use ahash::HashSet instead."""
# Banned in #2600, presumably so that poisoning won't need to be user-handled
[[disallowed-types]]
path = "std::sync::RwLock"
reason = """the standard library synchronization primitives are poisoned when aquiring threads panic.
use parking_lot::RwLock instead to silently ignore panics."""
[[disallowed-types]]
path = "std::sync::Mutex"
reason = """the standard library synchronization primitives are poisoned when aquiring threads panic.
use parking_lot::Mutex instead to silently ignore panics."""
[[disallowed-methods]]
path = "tempfile::NamedTempFile::new"
reason = """The temporary files created by this method are not persistable if the temporary directory lives on a different filesystem than the target directory. While it is valid in other contexts (if not persisting files), it was misused many times and so we are banning it. Consider using `tempfile::NamedTempFile::new_in` or `tempfile::NamedTempFile::Builder"""