Fix warnings for Rust 1.51 (#3214)

* Fix warnings for Rust 1.51

* More fixes

* More fixes
This commit is contained in:
Jonathan Turner
2021-03-26 21:26:57 +13:00
committed by GitHub
parent 589fc0b8ad
commit 7e184b58b2
55 changed files with 325 additions and 400 deletions

View File

@ -71,10 +71,7 @@ impl<'a, T: Plugin> PluginTest<'a, T> {
for flag in flags {
assert!(
flags_configured.iter().any(|f| *f == flag),
format!(
"The flag you passed ({}) is not configured in the plugin.",
flag
)
"The flag you passed is not configured in the plugin.",
);
}
}
@ -143,7 +140,7 @@ pub fn expect_return_value_at(
for (idx, item) in return_values.iter().enumerate() {
let item = match item {
Ok(return_value) => return_value,
Err(reason) => panic!(format!("{}", reason)),
Err(_) => panic!("Unexpected value"),
};
if idx == at {
@ -155,9 +152,5 @@ pub fn expect_return_value_at(
}
}
panic!(format!(
"Couldn't get return value from stream at {}. (There are {} items)",
at,
return_values.len() - 1
))
panic!("Couldn't get return value from stream.")
}