From d9f9c5658f135d2c5aca19ef435266170187c924 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 11 Aug 2019 02:01:20 +0900 Subject: chore: bump to newer nightly (#1426) --- tokio-sync/src/lock.rs | 1 - tokio-sync/src/mpsc/bounded.rs | 2 -- tokio-sync/src/mpsc/unbounded.rs | 1 - tokio-sync/src/oneshot.rs | 1 - tokio-sync/src/task/atomic_waker.rs | 2 +- tokio-sync/src/watch.rs | 8 +++----- tokio-sync/tests/fuzz_oneshot.rs | 2 +- 7 files changed, 5 insertions(+), 12 deletions(-) (limited to 'tokio-sync') diff --git a/tokio-sync/src/lock.rs b/tokio-sync/src/lock.rs index addef25f..2c31dae3 100644 --- a/tokio-sync/src/lock.rs +++ b/tokio-sync/src/lock.rs @@ -111,7 +111,6 @@ impl Lock { } /// A future that resolves on acquiring the lock and returns the `LockGuard`. - #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 pub async fn lock(&mut self) -> LockGuard { poll_fn(|cx| self.poll_lock(cx)).await } diff --git a/tokio-sync/src/mpsc/bounded.rs b/tokio-sync/src/mpsc/bounded.rs index 6c3a2fde..4f6f1ac6 100644 --- a/tokio-sync/src/mpsc/bounded.rs +++ b/tokio-sync/src/mpsc/bounded.rs @@ -167,7 +167,6 @@ impl Receiver { /// assert_eq!(Some("world"), rx.recv().await); /// } /// ``` - #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 pub async fn recv(&mut self) -> Option { use futures_util::future::poll_fn; @@ -244,7 +243,6 @@ impl Sender { /// } /// } /// ``` - #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 pub async fn send(&mut self, value: T) -> Result<(), SendError> { use futures_util::future::poll_fn; diff --git a/tokio-sync/src/mpsc/unbounded.rs b/tokio-sync/src/mpsc/unbounded.rs index 60694f15..2760b845 100644 --- a/tokio-sync/src/mpsc/unbounded.rs +++ b/tokio-sync/src/mpsc/unbounded.rs @@ -135,7 +135,6 @@ impl UnboundedReceiver { /// assert_eq!(Some("world"), rx.recv().await); /// } /// ``` - #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 pub async fn recv(&mut self) -> Option { use futures_util::future::poll_fn; diff --git a/tokio-sync/src/oneshot.rs b/tokio-sync/src/oneshot.rs index 7130118c..50176b3d 100644 --- a/tokio-sync/src/oneshot.rs +++ b/tokio-sync/src/oneshot.rs @@ -225,7 +225,6 @@ impl Sender { /// println!("the receiver dropped"); /// } /// ``` - #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 pub async fn closed(&mut self) { use futures_util::future::poll_fn; diff --git a/tokio-sync/src/task/atomic_waker.rs b/tokio-sync/src/task/atomic_waker.rs index 6f741d38..4085bc0b 100644 --- a/tokio-sync/src/task/atomic_waker.rs +++ b/tokio-sync/src/task/atomic_waker.rs @@ -306,7 +306,7 @@ impl WakerRef for Waker { } } -impl<'a> WakerRef for &'a Waker { +impl WakerRef for &Waker { fn wake(self) { self.wake_by_ref() } diff --git a/tokio-sync/src/watch.rs b/tokio-sync/src/watch.rs index 4fec6947..8067ed3b 100644 --- a/tokio-sync/src/watch.rs +++ b/tokio-sync/src/watch.rs @@ -249,8 +249,7 @@ impl Receiver { /// /// Only the **most recent** value is returned. If the receiver is falling /// behind the sender, intermediate values are dropped. - #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 - pub async fn recv_ref<'a>(&'a mut self) -> Option> { + pub async fn recv_ref(&mut self) -> Option> { let shared = &self.shared; let inner = &self.inner; let version = self.ver; @@ -296,7 +295,7 @@ impl Receiver { /// /// This is equivalent to calling `clone()` on the value returned by /// `recv()`. - #[allow(clippy::needless_lifetimes, clippy::map_clone)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 + #[allow(clippy::map_clone)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3274 pub async fn recv(&mut self) -> Option { self.recv_ref().await.map(|v_ref| v_ref.clone()) } @@ -388,7 +387,6 @@ impl Sender { /// /// This allows the producer to get notified when interest in the produced /// values is canceled and immediately stop doing work. - #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988 pub async fn closed(&mut self) { poll_fn(|cx| self.poll_close(cx)).await } @@ -447,7 +445,7 @@ impl Drop for Sender { // ===== impl Ref ===== -impl<'a, T: 'a> ops::Deref for Ref<'a, T> { +impl ops::Deref for Ref<'_, T> { type Target = T; fn deref(&self) -> &T { diff --git a/tokio-sync/tests/fuzz_oneshot.rs b/tokio-sync/tests/fuzz_oneshot.rs index ae990a0c..d1bcb40e 100644 --- a/tokio-sync/tests/fuzz_oneshot.rs +++ b/tokio-sync/tests/fuzz_oneshot.rs @@ -78,7 +78,7 @@ impl<'a> OnClose<'a> { } } -impl<'a> Future for OnClose<'a> { +impl Future for OnClose<'_> { type Output = bool; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { -- cgit v1.2.3