Skip to content

Commit

Permalink
Warn for uses of futures_util::stream::FuturesUnordered
Browse files Browse the repository at this point in the history
  • Loading branch information
hrxi committed Aug 2, 2024
1 parent 1dbade2 commit 3948e91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[disallowed-types]]
path = "futures_util::stream::FuturesUnordered"
reason = "use `nimiq_utils::stream::FuturesUnordered` instead, it does not need manual `Waker`s"

[[disallowed-types]]
path = "futures_util::stream::FuturesOrdered"
reason = "use `nimiq_utils::stream::FuturesOrdered` instead, it does not need manual `Waker`s"
4 changes: 4 additions & 0 deletions utils/src/stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// We need to silence this lint because we're using the original
// `FuturesOrdered` and `FuturesUnordered` in this module to reimplement them.
#![allow(clippy::disallowed_types)]

use std::{
future::Future,
pin::Pin,
Expand Down

0 comments on commit 3948e91

Please sign in to comment.