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
36
36
let next = futures_core:: ready!( self . as_mut( ) . stream( ) . poll_next( cx) ) ;
37
37
38
38
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
45
43
} ,
46
44
None => Poll :: Ready ( None ) ,
47
45
}
Original file line number Diff line number Diff line change @@ -36,12 +36,10 @@ where
36
36
let item = futures_core:: ready!( Pin :: new( & mut * self . stream) . poll_next( cx) ) ;
37
37
38
38
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
45
43
} ,
46
44
None => Poll :: Ready ( None ) ,
47
45
}
Original file line number Diff line number Diff line change 38
38
39
39
match next {
40
40
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) ) ;
47
44
} ,
48
45
None => return Poll :: Ready ( Some ( v) ) ,
49
46
} ,
You can’t perform that action at this time.
0 commit comments