diff --git a/curp/src/rpc/mod.rs b/curp/src/rpc/mod.rs index bd189ddc7..8d7237415 100644 --- a/curp/src/rpc/mod.rs +++ b/curp/src/rpc/mod.rs @@ -240,15 +240,12 @@ impl WaitSyncedResponse { asr: Option>, ) -> Self { match (er, asr) { - (None, Some(_)) => { + (None, Some(_)) | (Some(Err(_)), Some(_)) => { unreachable!("should not call after sync if execution fails") } (None, None) => WaitSyncedResponse::new_error::( WaitSyncError::Other("can't get er result".to_owned()).into(), ), // this is highly unlikely to happen, - (Some(Err(_)), Some(_)) => { - unreachable!("should not call after_sync when exe failed") - } (Some(Err(err)), None) => { WaitSyncedResponse::new_error(CommandSyncError::::Execute(err)) }