diff options
-rwxr-xr-x | bin/clippy | 1 | ||||
-rw-r--r-- | src/plugin/mod.rs | 12 | ||||
-rw-r--r-- | vm_control/src/lib.rs | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/bin/clippy b/bin/clippy index 5e5d329..f2a2a01 100755 --- a/bin/clippy +++ b/bin/clippy @@ -14,7 +14,6 @@ cd .. SUPPRESS=( # To be resolved. let_unit_value - needless_return option_map_unit_fn question_mark range_plus_one diff --git a/src/plugin/mod.rs b/src/plugin/mod.rs index 60a50da..c01ff80 100644 --- a/src/plugin/mod.rs +++ b/src/plugin/mod.rs @@ -733,11 +733,11 @@ pub fn run_config(cfg: Config) -> Result<()> { match plugin.try_wait() { // The plugin has run out of time by now - Ok(ProcessStatus::Running) => return Err(Error::PluginTimeout), + Ok(ProcessStatus::Running) => Err(Error::PluginTimeout), // Return an error discovered earlier in this function. - Ok(ProcessStatus::Success) => return res, - Ok(ProcessStatus::Fail(code)) => return Err(Error::PluginFailed(code)), - Ok(ProcessStatus::Signal(code)) => return Err(Error::PluginKilled(code)), - Err(e) => return Err(Error::PluginWait(e)), - }; + Ok(ProcessStatus::Success) => res, + Ok(ProcessStatus::Fail(code)) => Err(Error::PluginFailed(code)), + Ok(ProcessStatus::Signal(code)) => Err(Error::PluginKilled(code)), + Err(e) => Err(Error::PluginWait(e)), + } } diff --git a/vm_control/src/lib.rs b/vm_control/src/lib.rs index ac974a1..fcf87e8 100644 --- a/vm_control/src/lib.rs +++ b/vm_control/src/lib.rs @@ -321,7 +321,7 @@ impl VmRequest { Ok(response) => VmResponse::UsbResponse(response), Err(e) => { error!("fail to recv command from usb control socket: {}", e); - return VmResponse::Err(SysError::new(EIO)); + VmResponse::Err(SysError::new(EIO)) } } } |