diff options
author | Alice Ryhl <alice@ryhl.io> | 2020-10-01 23:59:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 00:59:48 +0300 |
commit | 496e8899172a39eb8b2cff0f2462141ddc6b575d (patch) | |
tree | 39e8048943abd48b6aa04b79e804c0d1c5133269 /tokio/src/sync/batch_semaphore.rs | |
parent | 53ccfc1fd694ee70c7a4d1e7af09a856bafb49e5 (diff) |
Fix new clippy warning (#2899)
Diffstat (limited to 'tokio/src/sync/batch_semaphore.rs')
-rw-r--r-- | tokio/src/sync/batch_semaphore.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tokio/src/sync/batch_semaphore.rs b/tokio/src/sync/batch_semaphore.rs index 6305485b..148e8316 100644 --- a/tokio/src/sync/batch_semaphore.rs +++ b/tokio/src/sync/batch_semaphore.rs @@ -133,7 +133,7 @@ impl Semaphore { pub(crate) const fn const_new(mut permits: usize) -> Self { // NOTE: assertions and by extension panics are still being worked on: https://github.com/rust-lang/rust/issues/74925 // currently we just clamp the permit count when it exceeds the max - permits = permits & Self::MAX_PERMITS; + permits &= Self::MAX_PERMITS; Self { permits: AtomicUsize::new(permits << Self::PERMIT_SHIFT), |