From 22422bdc968b222bb97f7a1825b72ac4fd378bbe Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Thu, 18 Apr 2019 17:04:00 +0900 Subject: [PATCH] Remove #[allow(clippy::needless_lifetimes)] --- futures-util/src/future/maybe_done.rs | 1 - futures-util/src/sink/map_err.rs | 1 - futures-util/src/sink/with.rs | 1 - futures-util/src/sink/with_flat_map.rs | 1 - futures-util/src/stream/buffer_unordered.rs | 1 - futures-util/src/stream/buffered.rs | 1 - futures-util/src/stream/fuse.rs | 1 - futures-util/src/stream/futures_unordered/mod.rs | 1 - futures-util/src/try_future/flatten_sink.rs | 1 - 9 files changed, 9 deletions(-) diff --git a/futures-util/src/future/maybe_done.rs b/futures-util/src/future/maybe_done.rs index 750bb90b28..dc174e5ca7 100644 --- a/futures-util/src/future/maybe_done.rs +++ b/futures-util/src/future/maybe_done.rs @@ -50,7 +50,6 @@ impl MaybeDone { /// future has been completed and [`take_output`](MaybeDone::take_output) /// has not yet been called. #[inline] - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 pub fn output_mut<'a>(self: Pin<&'a mut Self>) -> Option<&'a mut Fut::Output> { unsafe { let this = Pin::get_unchecked_mut(self); diff --git a/futures-util/src/sink/map_err.rs b/futures-util/src/sink/map_err.rs index c4f911dbb0..dd9518b0d2 100644 --- a/futures-util/src/sink/map_err.rs +++ b/futures-util/src/sink/map_err.rs @@ -33,7 +33,6 @@ impl SinkMapErr { } /// Get a pinned reference to the inner sink. - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 pub fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut Si> { unsafe { Pin::map_unchecked_mut(self, |x| &mut x.sink) } } diff --git a/futures-util/src/sink/with.rs b/futures-util/src/sink/with.rs index 120d920159..3d0d296893 100644 --- a/futures-util/src/sink/with.rs +++ b/futures-util/src/sink/with.rs @@ -58,7 +58,6 @@ enum State { } impl State { - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 #[allow(clippy::wrong_self_convention)] fn as_pin_mut<'a>( self: Pin<&'a mut Self>, diff --git a/futures-util/src/sink/with_flat_map.rs b/futures-util/src/sink/with_flat_map.rs index 18e9e6ba43..b9f0f3ab55 100644 --- a/futures-util/src/sink/with_flat_map.rs +++ b/futures-util/src/sink/with_flat_map.rs @@ -59,7 +59,6 @@ where } /// Get a pinned mutable reference to the inner sink. - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 pub fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut Si> { unsafe { Pin::map_unchecked_mut(self, |x| &mut x.sink) } } diff --git a/futures-util/src/stream/buffer_unordered.rs b/futures-util/src/stream/buffer_unordered.rs index e752925ce5..a92a3dc2f9 100644 --- a/futures-util/src/stream/buffer_unordered.rs +++ b/futures-util/src/stream/buffer_unordered.rs @@ -80,7 +80,6 @@ where /// /// Note that care must be taken to avoid tampering with the state of the /// stream which may otherwise confuse this combinator. - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 pub fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut St> { unsafe { Pin::map_unchecked_mut(self, |x| x.get_mut()) } } diff --git a/futures-util/src/stream/buffered.rs b/futures-util/src/stream/buffered.rs index dbc54a482b..94b2b53b1b 100644 --- a/futures-util/src/stream/buffered.rs +++ b/futures-util/src/stream/buffered.rs @@ -75,7 +75,6 @@ where /// /// Note that care must be taken to avoid tampering with the state of the /// stream which may otherwise confuse this combinator. - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 pub fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut St> { unsafe { Pin::map_unchecked_mut(self, |x| x.get_mut()) } } diff --git a/futures-util/src/stream/fuse.rs b/futures-util/src/stream/fuse.rs index 7eab4596ff..0f30b88fb3 100644 --- a/futures-util/src/stream/fuse.rs +++ b/futures-util/src/stream/fuse.rs @@ -51,7 +51,6 @@ impl Fuse { /// /// Note that care must be taken to avoid tampering with the state of the /// stream which may otherwise confuse this combinator. - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 pub fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> Pin<&'a mut St> { unsafe { Pin::map_unchecked_mut(self, |x| x.get_mut()) } } diff --git a/futures-util/src/stream/futures_unordered/mod.rs b/futures-util/src/stream/futures_unordered/mod.rs index 84ebb029d9..a754381f3e 100644 --- a/futures-util/src/stream/futures_unordered/mod.rs +++ b/futures-util/src/stream/futures_unordered/mod.rs @@ -195,7 +195,6 @@ impl FuturesUnordered { } /// Returns an iterator that allows modifying each future in the set. - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 pub fn iter_pin_mut<'a>(self: Pin<&'a mut Self>) -> IterPinMut<'a, Fut> { IterPinMut { task: self.head_all, diff --git a/futures-util/src/try_future/flatten_sink.rs b/futures-util/src/try_future/flatten_sink.rs index 940a6f396e..22cc6a529a 100644 --- a/futures-util/src/try_future/flatten_sink.rs +++ b/futures-util/src/try_future/flatten_sink.rs @@ -25,7 +25,6 @@ where FlattenSink(Waiting(future)) } - #[allow(clippy::needless_lifetimes)] // https://github.com/rust-lang/rust/issues/52675 fn project_pin<'a>( self: Pin<&'a mut Self> ) -> State, Pin<&'a mut Si>> {