File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -418,13 +418,14 @@ impl<H: ReactionHandler> Runtime<H> {
418418 if self . handle_events ( tick, events) {
419419 // If a wake event was emitted, eagerly consume all control messages.
420420 loop {
421+ use ControlMessage :: * ;
422+ use TryRecvError :: * ;
423+
421424 match self . receiver . try_recv ( ) {
422- Err ( TryRecvError :: Empty ) => break ,
423- Err ( TryRecvError :: Disconnected ) => {
424- panic ! ( "control channel disconnected unexpectedly" )
425- }
426- Ok ( ControlMessage :: Shutdown ) => return self . handle_shutdown ( ) ,
427- Ok ( ControlMessage :: Command ( cmd) ) => self . service . handle_command ( * cmd) ,
425+ Ok ( Command ( cmd) ) => self . service . handle_command ( * cmd) ,
426+ Ok ( Shutdown ) => return self . handle_shutdown ( ) ,
427+ Err ( Empty ) => break ,
428+ Err ( Disconnected ) => panic ! ( "control channel disconnected unexpectedly" ) ,
428429 }
429430 }
430431 }
You can’t perform that action at this time.
0 commit comments