rust-clippy: fix warning about nested ifs
authorRaphaël Gomès <rgomes@octobus.net>
Wed, 25 Jan 2023 18:44:09 +0100
changeset 49948 70b4c7af9cdb
parent 49944 8f76a41ee465
child 49949 3c37cb7bce61
rust-clippy: fix warning about nested ifs
rust/rhg/src/commands/status.rs
--- 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 {