@@ -68,18 +68,12 @@ enum State<Fut, T> {
6868}
6969
7070impl < 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