File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,16 @@ where
9999 type Output = Either < ( A :: Output , B ) , ( B :: Output , A ) > ;
100100
101101 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" ) ;
103103
104104 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 ) ) ) ;
106106 }
107107
108108 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 ) ) ) ;
110110 }
111111
112- self . inner = Some ( ( a, b) ) ;
113112 Poll :: Pending
114113 }
115114}
You can’t perform that action at this time.
0 commit comments