about summary refs log tree commit diff
path: root/compiler/rustc_driver/src
diff options
context:
space:
mode:
authorLingMan <LingMan@users.noreply.github.com>2021-01-11 20:45:33 +0100
committerLingMan <LingMan@users.noreply.github.com>2021-01-14 19:23:59 +0100
commita56bffb4f9d6f7791b2fa40412bd3e0549d76cc3 (patch)
tree23875d16475aea0b37a608f0ca704a3016c1f0e4 /compiler/rustc_driver/src
parentd03fe84169d50a4b96cdef7b2f862217ab634055 (diff)
downloadrust-a56bffb4f9d6f7791b2fa40412bd3e0549d76cc3.tar.gz
rust-a56bffb4f9d6f7791b2fa40412bd3e0549d76cc3.zip
Use Option::map_or instead of `.map(..).unwrap_or(..)`
Diffstat (limited to 'compiler/rustc_driver/src')
-rw-r--r--compiler/rustc_driver/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs
index 509f81e1653..aede631849a 100644
--- a/compiler/rustc_driver/src/lib.rs
+++ b/compiler/rustc_driver/src/lib.rs
@@ -1236,7 +1236,7 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
     }
 
     // If backtraces are enabled, also print the query stack
-    let backtrace = env::var_os("RUST_BACKTRACE").map(|x| &x != "0").unwrap_or(false);
+    let backtrace = env::var_os("RUST_BACKTRACE").map_or(false, |x| &x != "0");
 
     let num_frames = if backtrace { None } else { Some(2) };