Skip to content

Commit

Permalink
add clippy.toml to disallow methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaeroxe committed Aug 13, 2024
1 parent a5d72a6 commit 29a1f7b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
disallowed-methods = [
# These functions are very easy to misuse, please use `MaybeUninit` instead.
"std::mem::zeroed",
"std::mem::uninitialized",
# Unbounded memory growth is not approved for use. Use a bounded channel buffer.
"std::sync::mpsc::channel",
"tokio::sync::mpsc::unbounded_channel",
"crossbeam_channel::unbounded",
# These methods poll futures in a biased manner without containing the word "biased" in their name.
# This is a footgun and can result in the system starving itself out during high load scenarios.
# See https://github.com/rust-lang/futures-rs/issues/2135 for more.
"futures::future::select",
"futures_util::future::select",
"futures::future::try_select",
"futures_util::future::try_select",
"futures::future::select_ok",
"futures_util::future::select_ok",
]

0 comments on commit 29a1f7b

Please sign in to comment.