-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Expand file tree
/
Copy path.clippy.toml
More file actions
23 lines (23 loc) · 1.57 KB
/
.clippy.toml
File metadata and controls
23 lines (23 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
too-many-arguments-threshold = 20
disallowed-methods = [
# we use tracing with the log feature instead of the log crate.
# Marked as `allow-invalid` since this warning expects a function but these are macros
{ path = "log::info", reason = "use tracing::info instead", allow-invalid = true },
{ path = "log::debug", reason = "use tracing::debug instead", allow-invalid = true },
{ path = "log::error", reason = "use tracing::error instead", allow-invalid = true },
{ path = "log::warn", reason = "use tracing::warn instead", allow-invalid = true },
# unbounded channels are for expert use only
{ path = "tokio::sync::mpsc::unbounded_channel", reason = "use a bounded channel instead" },
{ path = "futures::channel::mpsc::unbounded", reason = "use a bounded channel instead" },
{ path = "futures_channel::mpsc::unbounded", reason = "use a bounded channel instead" },
# known to cause blocking issues
{ path = "futures::executor::block_on", reason = "use tokio::runtime::runtime::Runtime::block_on instead"},
# bincode::deserialize_from is easy to shoot your foot with
{ path = "bincode::deserialize_from", reason = "use bincode::deserialize instead" },
# zip silently truncates when iterators have different lengths
{ path = "core::iter::Iterator::zip", reason = "use zip_eq or zip_debug_eq instead, which detect length mismatches" },
]
disallowed-macros = [
# izip! uses zip internally which silently truncates
{ path = "itertools::izip", reason = "use izip_debug_eq! instead (or chain zip_eq calls), which detect length mismatches" },
]