diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 14:55:06 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 15:40:40 +0200 |
commit | 3ab8c14af3c5e46f885b2a89b8d8d45a15311b9e (patch) | |
tree | aaf2d4674adde68c327ea6e6d6cb18f34620bbb5 | |
parent | 94a361d7da8db72c76f0b7c3d1546be5d17c292a (diff) |
Fix clippy: Remove needless return keyword
This fixes clippy::needless_return
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | crates/common/flockfile/src/unix.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/crates/common/flockfile/src/unix.rs b/crates/common/flockfile/src/unix.rs index 4ef847d2..79fb71e4 100644 --- a/crates/common/flockfile/src/unix.rs +++ b/crates/common/flockfile/src/unix.rs @@ -116,15 +116,13 @@ pub fn check_another_instance_is_not_running( .as_path(), ) { Ok(file) => Ok(file), - Err(err) => { - return match &err { - FlockfileError::FromIo { path, .. } | FlockfileError::FromNix { path, .. } => { - error!("Another instance of {} is running.", app_name); - error!("Lock file path: {}", path.as_path().to_str().unwrap()); - Err(err) - } + Err(err) => match &err { + FlockfileError::FromIo { path, .. } | FlockfileError::FromNix { path, .. } => { + error!("Another instance of {} is running.", app_name); + error!("Lock file path: {}", path.as_path().to_str().unwrap()); + Err(err) } - } + }, } } |