Fix a number of warnings on nightly Rust (#2652)
This fixes some issues that are cropping up where some syntax will get phased out in 2021
This commit is contained in:
@@ -25,7 +25,8 @@ impl RecipeGroup {
|
||||
fn push(&mut self, builder: EncodingRecipeBuilder) {
|
||||
assert!(
|
||||
self.name_to_recipe.get(&builder.name).is_none(),
|
||||
format!("riscv recipe '{}' created twice", builder.name)
|
||||
"riscv recipe '{}' created twice",
|
||||
builder.name
|
||||
);
|
||||
let name = builder.name.clone();
|
||||
let number = self.recipes.push(builder.build());
|
||||
|
||||
@@ -45,10 +45,8 @@ impl PerCpuModeEncodings {
|
||||
if let Some(found_index) = self.recipes_by_name.get(&recipe.name) {
|
||||
assert!(
|
||||
self.recipes[*found_index] == recipe,
|
||||
format!(
|
||||
"trying to insert different recipes with a same name ({})",
|
||||
recipe.name
|
||||
)
|
||||
"trying to insert different recipes with a same name ({})",
|
||||
recipe.name
|
||||
);
|
||||
*found_index
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user