Rollup merge of #80944 - LingMan:map_or, r=nagisa
Use Option::map_or instead of `.map(..).unwrap_or(..)` ``@rustbot`` modify labels +C-cleanup +T-compiler
This commit is contained in:
commit
a584d87417
50 changed files with 67 additions and 79 deletions
|
@ -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) };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue