summaryrefslogtreecommitdiffstats
path: root/tokio/src/sync
diff options
context:
space:
mode:
authorAlice Ryhl <alice@ryhl.io>2020-10-01 23:59:48 +0200
committerGitHub <noreply@github.com>2020-10-02 00:59:48 +0300
commit496e8899172a39eb8b2cff0f2462141ddc6b575d (patch)
tree39e8048943abd48b6aa04b79e804c0d1c5133269 /tokio/src/sync
parent53ccfc1fd694ee70c7a4d1e7af09a856bafb49e5 (diff)
Fix new clippy warning (#2899)
Diffstat (limited to 'tokio/src/sync')
-rw-r--r--tokio/src/sync/batch_semaphore.rs2
-rw-r--r--tokio/src/sync/oneshot.rs1
2 files changed, 1 insertions, 2 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),
diff --git a/tokio/src/sync/oneshot.rs b/tokio/src/sync/oneshot.rs
index 17767e7f..32506bc3 100644
--- a/tokio/src/sync/oneshot.rs
+++ b/tokio/src/sync/oneshot.rs
@@ -124,7 +124,6 @@ struct State(usize);
/// }
/// ```
pub fn channel<T>() -> (Sender<T>, Receiver<T>) {
- #[allow(deprecated)]
let inner = Arc::new(Inner {
state: AtomicUsize::new(State::new().as_usize()),
value: UnsafeCell::new(None),