Skip to content

Commit 03ba090

Browse files
committed
Remove #[allow(clippy::wrong_self_convention)]
1 parent cde791c commit 03ba090

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

futures-util/src/sink/with.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +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(self: Pin<&mut Self>) -> State<Pin<&mut Fut>, Pin<&mut T>> {
71+
fn get_pin_mut(self: Pin<&mut Self>) -> State<Pin<&mut Fut>, Pin<&mut T>> {
7372
unsafe {
7473
match self.get_unchecked_mut() {
75-
State::Empty =>
76-
State::Empty,
77-
State::Process(fut) =>
78-
State::Process(Pin::new_unchecked(fut)),
79-
State::Buffered(item) =>
80-
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)),
8177
}
8278
}
8379
}
@@ -132,7 +128,7 @@ impl<Si, Item, U, Fut, F, E> With<Si, Item, U, Fut, F>
132128
mut self: Pin<&mut Self>,
133129
cx: &mut Context<'_>,
134130
) -> Poll<Result<(), E>> {
135-
let buffered = match self.as_mut().state().as_pin_mut() {
131+
let buffered = match self.as_mut().state().get_pin_mut() {
136132
State::Empty => return Poll::Ready(Ok(())),
137133
State::Process(fut) => Some(ready!(fut.poll(cx))?),
138134
State::Buffered(_) => None,

0 commit comments

Comments
 (0)