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
|
@ -247,8 +247,7 @@ where
|
|||
for (mono_item, linkage) in cgu.items() {
|
||||
let symbol_name = mono_item.symbol_name(tcx).name;
|
||||
let symbol_hash_start = symbol_name.rfind('h');
|
||||
let symbol_hash =
|
||||
symbol_hash_start.map(|i| &symbol_name[i..]).unwrap_or("<no hash>");
|
||||
let symbol_hash = symbol_hash_start.map_or("<no hash>", |i| &symbol_name[i..]);
|
||||
|
||||
debug!(
|
||||
" - {} [{:?}] [{}] estimated size {}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue