about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2022-11-22 14:30:29 +0100
committerPhilipp Krones <hello@philkrones.com>2022-11-22 14:30:29 +0100
commite95d40980b3044a6a9cad1b5e72eb57390790d18 (patch)
tree7d62139e43fb9c8c34dddd9eeaecb4219c2e4aef
parent6fce4691d523f0d22596c53e6fe420b442894482 (diff)
downloadrust-e95d40980b3044a6a9cad1b5e72eb57390790d18.tar.gz
rust-e95d40980b3044a6a9cad1b5e72eb57390790d18.zip
Clippy: Workaround for let_chains issue
-rw-r--r--src/driver.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/driver.rs b/src/driver.rs
index ee2a3ad20d3..ad6132a49ba 100644
--- a/src/driver.rs
+++ b/src/driver.rs
@@ -90,11 +90,12 @@ fn track_files(parse_sess: &mut ParseSess, conf_path_string: Option<String>) {
 
     // During development track the `clippy-driver` executable so that cargo will re-run clippy whenever
     // it is rebuilt
-    if cfg!(debug_assertions)
-        && let Ok(current_exe) = env::current_exe()
-        && let Some(current_exe) = current_exe.to_str()
-    {
-        file_depinfo.insert(Symbol::intern(current_exe));
+    if cfg!(debug_assertions) {
+        if let Ok(current_exe) = env::current_exe()
+            && let Some(current_exe) = current_exe.to_str()
+        {
+            file_depinfo.insert(Symbol::intern(current_exe));
+        }
     }
 }