Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove #[allow(clippy::needless_lifetimes)] #1534

Merged
merged 1 commit into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion futures-util/src/future/maybe_done.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ impl<Fut: Future> MaybeDone<Fut> {
/// 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);
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/sink/map_err.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ impl<Si, F> SinkMapErr<Si, F> {
}

/// 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) }
}
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/sink/with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ enum State<Fut, T> {
}

impl<Fut, T> State<Fut, T> {
#[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>,
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/sink/with_flat_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/stream/buffer_unordered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }
}
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/stream/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }
}
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/stream/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ impl<St: Stream> Fuse<St> {
///
/// 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()) }
}
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/stream/futures_unordered/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ impl<Fut> FuturesUnordered<Fut> {
}

/// 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,
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/try_future/flatten_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 Fut>, Pin<&'a mut Si>> {
Expand Down