File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,6 @@ where C: RaftTypeConfig
321321            RPCError :: Unreachable ( e)  => RPCError :: Unreachable ( e) , 
322322            RPCError :: PayloadTooLarge ( e)  => RPCError :: PayloadTooLarge ( e) , 
323323            RPCError :: Network ( e)  => RPCError :: Network ( e) , 
324-             RPCError :: RemoteError ( _infallible)  => unreachable ! ( ) , 
325324        } 
326325    } 
327326} 
Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ where E: Into<Infallible>
1111    fn  into_ok ( self )  -> T  { 
1212        match  self  { 
1313            Ok ( t)  => t, 
14-             Err ( _)  => unreachable ! ( ) , 
14+             Err ( e)  => { 
15+                 // NOTE: `allow` required because of buggy reachability detection by rust compiler 
16+                 #[ allow( unreachable_code) ]  
17+                 match  e. into ( )  { } 
18+             } 
1519        } 
1620    } 
1721} 
Original file line number Diff line number Diff line change @@ -48,17 +48,13 @@ impl<C: RaftTypeConfig> From<StreamingError<C>> for ReplicationError<C> {
4848
4949impl < C :  RaftTypeConfig >  From < RPCError < C > >  for  StreamingError < C >  { 
5050    fn  from ( value :  RPCError < C > )  -> Self  { 
51-         #[ allow( unreachable_patterns) ]  
5251        match  value { 
5352            RPCError :: Timeout ( e)  => StreamingError :: Timeout ( e) , 
5453            RPCError :: Unreachable ( e)  => StreamingError :: Unreachable ( e) , 
5554            RPCError :: PayloadTooLarge ( _e)  => { 
5655                unreachable ! ( "PayloadTooLarge should not be converted to StreamingError" ) 
5756            } 
5857            RPCError :: Network ( e)  => StreamingError :: Network ( e) , 
59-             RPCError :: RemoteError ( _e)  => { 
60-                 unreachable ! ( "Infallible error should not be produced at all" ) 
61-             } 
6258        } 
6359    } 
6460} 
Original file line number Diff line number Diff line change @@ -74,11 +74,8 @@ impl AsyncRuntime for MonoioRuntime {
7474    } 
7575
7676    #[ inline]  
77-     fn  is_panic ( _join_error :  & Self :: JoinError )  -> bool  { 
78-         // Given that joining a task will never fail, i.e., `Self::JoinError` 
79-         // will never be constructed, and it is impossible to construct an 
80-         // enum like `Infallible`, this function could never be invoked. 
81-         unreachable ! ( "unreachable since argument `join_error` could never be constructed" ) 
77+     fn  is_panic ( join_error :  & Self :: JoinError )  -> bool  { 
78+         match  * join_error { } 
8279    } 
8380
8481    #[ inline]  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments