File tree Expand file tree Collapse file tree 3 files changed +11
-18
lines changed Expand file tree Collapse file tree 3 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,10 @@ where
3636 let next = futures_core:: ready!( self . as_mut( ) . stream( ) . poll_next( cx) ) ;
3737
3838 match next {
39- Some ( v) => match ( self . as_mut ( ) . predicate ( ) ) ( & v) {
40- true => Poll :: Ready ( Some ( v) ) ,
41- false => {
42- cx. waker ( ) . wake_by_ref ( ) ;
43- Poll :: Pending
44- }
39+ Some ( v) if ( self . as_mut ( ) . predicate ( ) ) ( & v) => Poll :: Ready ( Some ( v) ) ,
40+ Some ( _) => {
41+ cx. waker ( ) . wake_by_ref ( ) ;
42+ Poll :: Pending
4543 } ,
4644 None => Poll :: Ready ( None ) ,
4745 }
Original file line number Diff line number Diff line change @@ -36,12 +36,10 @@ where
3636 let item = futures_core:: ready!( Pin :: new( & mut * self . stream) . poll_next( cx) ) ;
3737
3838 match item {
39- Some ( v) => match ( & mut self . p ) ( & v) {
40- true => Poll :: Ready ( Some ( v) ) ,
41- false => {
42- cx. waker ( ) . wake_by_ref ( ) ;
43- Poll :: Pending
44- }
39+ Some ( v) if ( & mut self . p ) ( & v) => Poll :: Ready ( Some ( v) ) ,
40+ Some ( _) => {
41+ cx. waker ( ) . wake_by_ref ( ) ;
42+ Poll :: Pending
4543 } ,
4644 None => Poll :: Ready ( None ) ,
4745 }
Original file line number Diff line number Diff line change 3838
3939 match next {
4040 Some ( v) => match self . as_mut ( ) . predicate ( ) {
41- Some ( p) => match p ( & v) {
42- true => ( ) ,
43- false => {
44- * self . as_mut ( ) . predicate ( ) = None ;
45- return Poll :: Ready ( Some ( v) ) ;
46- }
41+ Some ( p) => if !p ( & v) {
42+ * self . as_mut ( ) . predicate ( ) = None ;
43+ return Poll :: Ready ( Some ( v) ) ;
4744 } ,
4845 None => return Poll :: Ready ( Some ( v) ) ,
4946 } ,
You can’t perform that action at this time.
0 commit comments