Commit 99c39a8 1 parent bd3f23b commit 99c39a8 Copy full SHA for 99c39a8
File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl<T: EventMessage + Unpin> Stream for Connection<T> {
139
139
}
140
140
141
141
// read from the ws
142
- match ready ! ( pin. ws. poll_next_unpin( cx) ) {
142
+ return match ready ! ( pin. ws. poll_next_unpin( cx) ) {
143
143
Some ( Ok ( WsMessage :: Text ( text) ) ) => {
144
144
let ready = match serde_json:: from_str :: < Message < T > > ( & text) {
145
145
Ok ( msg) => {
@@ -154,21 +154,21 @@ impl<T: EventMessage + Unpin> Stream for Connection<T> {
154
154
continue ;
155
155
}
156
156
} ;
157
- return Poll :: Ready ( Some ( ready) ) ;
157
+ Poll :: Ready ( Some ( ready) )
158
158
}
159
- Some ( Ok ( WsMessage :: Close ( _) ) ) => return Poll :: Ready ( None ) ,
159
+ Some ( Ok ( WsMessage :: Close ( _) ) ) => Poll :: Ready ( None ) ,
160
160
// ignore ping and pong
161
161
Some ( Ok ( WsMessage :: Ping ( _) ) ) | Some ( Ok ( WsMessage :: Pong ( _) ) ) => {
162
162
cx. waker ( ) . wake_by_ref ( ) ;
163
- return Poll :: Pending ;
163
+ Poll :: Pending
164
164
}
165
- Some ( Ok ( msg) ) => return Poll :: Ready ( Some ( Err ( CdpError :: UnexpectedWsMessage ( msg) ) ) ) ,
166
- Some ( Err ( err) ) => return Poll :: Ready ( Some ( Err ( CdpError :: Ws ( err) ) ) ) ,
165
+ Some ( Ok ( msg) ) => Poll :: Ready ( Some ( Err ( CdpError :: UnexpectedWsMessage ( msg) ) ) ) ,
166
+ Some ( Err ( err) ) => Poll :: Ready ( Some ( Err ( CdpError :: Ws ( err) ) ) ) ,
167
167
None => {
168
168
// ws connection closed
169
- return Poll :: Ready ( None ) ;
169
+ Poll :: Ready ( None )
170
170
}
171
- }
171
+ } ;
172
172
}
173
173
}
174
174
}
You can’t perform that action at this time.
0 commit comments