changeset 49948:70b4c7af9cdb

rust-clippy: fix warning about nested ifs
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 25 Jan 2023 18:44:09 +0100
parents 8f76a41ee465
children 3c37cb7bce61
files rust/rhg/src/commands/status.rs
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rust/rhg/src/commands/status.rs	Thu Jan 19 11:12:20 2023 -0500
+++ b/rust/rhg/src/commands/status.rs	Wed Jan 25 18:44:09 2023 +0100
@@ -578,12 +578,10 @@
 
     let entry_flags = if check_exec {
         entry.flags
+    } else if entry.flags == Some(b'x') {
+        None
     } else {
-        if entry.flags == Some(b'x') {
-            None
-        } else {
-            entry.flags
-        }
+        entry.flags
     };
 
     if entry_flags != fs_flags {