File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,16 @@ where
99
99
type Output = Either < ( A :: Output , B ) , ( B :: Output , A ) > ;
100
100
101
101
fn poll ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
102
- let ( mut a, mut b) = self . inner . take ( ) . expect ( "cannot poll Select twice" ) ;
102
+ let ( a, b) = self . inner . as_mut ( ) . expect ( "cannot poll Select twice" ) ;
103
103
104
104
if let Poll :: Ready ( val) = a. poll_unpin ( cx) {
105
- return Poll :: Ready ( Either :: Left ( ( val, b ) ) ) ;
105
+ return Poll :: Ready ( Either :: Left ( ( val, self . inner . take ( ) . unwrap ( ) . 1 ) ) ) ;
106
106
}
107
107
108
108
if let Poll :: Ready ( val) = b. poll_unpin ( cx) {
109
- return Poll :: Ready ( Either :: Right ( ( val, a ) ) ) ;
109
+ return Poll :: Ready ( Either :: Right ( ( val, self . inner . take ( ) . unwrap ( ) . 0 ) ) ) ;
110
110
}
111
111
112
- self . inner = Some ( ( a, b) ) ;
113
112
Poll :: Pending
114
113
}
115
114
}
You can’t perform that action at this time.
0 commit comments