# Keep inherent impls with identical bounds together within each module. inherent-impl-lint-scope = "module" # Disallow futures::channel types. Use commonware_utils::channel instead. disallowed-types = [ { path = "std::sync::Condvar", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "std::sync::Mutex", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "std::sync::Once", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "std::sync::RwLock", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "futures::lock::Mutex", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "async_lock::RwLock", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "async_lock::RwLockReadGuard", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "async_lock::RwLockWriteGuard", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "async_lock::RwLockUpgradableReadGuard", reason = "prefer commonware_utils::sync", allow-invalid = true }, { path = "futures::channel::mpsc::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures::channel::mpsc::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures::channel::mpsc::UnboundedSender", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures::channel::mpsc::UnboundedReceiver", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures::channel::oneshot::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures::channel::oneshot::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures_channel::mpsc::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures_channel::mpsc::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures_channel::mpsc::UnboundedSender", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures_channel::mpsc::UnboundedReceiver", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures_channel::oneshot::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures_channel::oneshot::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true }, { path = "futures::future::TryJoinAll", reason = "use commonware_utils::futures::try_join_all to avoid delaying errors behind pending futures", allow-invalid = true }, { path = "futures_util::future::TryJoinAll", reason = "use commonware_utils::futures::try_join_all to avoid delaying errors behind pending futures", allow-invalid = true }, ] # Disallow direct use of futures select macros. Use commonware_macros::select! instead. # tokio::select is not listed here because our select! macro expands to it, and clippy # checks after macro expansion. disallowed-macros = [ { path = "futures::select", reason = "use commonware_macros::select! instead" }, { path = "futures::select_biased", reason = "use commonware_macros::select! instead" }, ] disallowed-methods = [ { path = "commonware_p2p::Blocker::block", reason = "use commonware_p2p::block! instead" }, { path = "futures::future::try_join_all", reason = "use commonware_utils::futures::try_join_all to avoid delaying errors behind pending futures" }, { path = "futures_util::future::try_join_all", reason = "use commonware_utils::futures::try_join_all to avoid delaying errors behind pending futures" }, ]