Replace a few expect+format combos with unwrap_or_else+panic
This commit is contained in:
parent
210d61f05c
commit
fe588d894f
5 changed files with 8 additions and 8 deletions
|
@ -1277,7 +1277,7 @@ pub fn provide(providers: &mut Providers) {
|
|||
all.iter()
|
||||
.find(|cgu| *cgu.name() == name)
|
||||
.cloned()
|
||||
.expect(&format!("failed to find cgu with name {:?}", name))
|
||||
.unwrap_or_else(|| panic!("failed to find cgu with name {:?}", name))
|
||||
};
|
||||
providers.compile_codegen_unit = compile_codegen_unit;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue