Some simple clippy::perf fixes

This commit is contained in:
Nilstrieb 2023-04-09 21:52:46 +02:00
parent 1c39afb375
commit f058d05fc2
5 changed files with 5 additions and 6 deletions

View file

@ -149,7 +149,7 @@ mod rustc {
.iter()
.enumerate()
.find(|(_, field_def)| name == field_def.name)
.expect(&format!("There were no fields named `{name}`."));
.unwrap_or_else(|| panic!("There were no fields named `{name}`."));
fields[field_idx].unwrap_leaf() == ScalarInt::TRUE
};