Skip to content

Commit f1f0666

Browse files
committed
Remove #[allow(clippy::wrong_self_convention)]
1 parent 2760e4b commit f1f0666

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

futures-util/src/sink/with.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,12 @@ enum State<Fut, T> {
6868
}
6969

7070
impl<Fut, T> State<Fut, T> {
71-
#[allow(clippy::wrong_self_convention)]
72-
fn as_pin_mut<'a>(
73-
self: Pin<&'a mut Self>,
74-
) -> State<Pin<&'a mut Fut>, Pin<&'a mut T>> {
71+
fn get_pin_mut<'a>(self: Pin<&'a mut Self>) -> State<Pin<&'a mut Fut>, Pin<&'a mut T>> {
7572
unsafe {
7673
match self.get_unchecked_mut() {
77-
State::Empty =>
78-
State::Empty,
79-
State::Process(fut) =>
80-
State::Process(Pin::new_unchecked(fut)),
81-
State::Buffered(item) =>
82-
State::Buffered(Pin::new_unchecked(item)),
74+
State::Empty => State::Empty,
75+
State::Process(fut) => State::Process(Pin::new_unchecked(fut)),
76+
State::Buffered(item) => State::Buffered(Pin::new_unchecked(item)),
8377
}
8478
}
8579
}
@@ -134,7 +128,7 @@ impl<Si, Item, U, Fut, F, E> With<Si, Item, U, Fut, F>
134128
mut self: Pin<&mut Self>,
135129
cx: &mut Context<'_>,
136130
) -> Poll<Result<(), E>> {
137-
let buffered = match self.as_mut().state().as_pin_mut() {
131+
let buffered = match self.as_mut().state().get_pin_mut() {
138132
State::Empty => return Poll::Ready(Ok(())),
139133
State::Process(fut) => Some(ready!(fut.poll(cx))?),
140134
State::Buffered(_) => None,

0 commit comments

Comments
 (0)