tree wide: some stylistic clippy fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2022-04-11 08:14:28 +02:00
parent b22d785c18
commit 12558e0dde
9 changed files with 25 additions and 28 deletions
+4 -5
View File
@@ -141,18 +141,17 @@ impl OutputFormatter for ExtJsFormatter {
}
fn format_error(&self, err: Error) -> Response<Body> {
let message: String;
let mut errors = HashMap::new();
match err.downcast::<ParameterError>() {
let message: String = match err.downcast::<ParameterError>() {
Ok(param_err) => {
for (name, err) in param_err {
errors.insert(name, err.to_string());
}
message = String::from("parameter verification errors");
String::from("parameter verification errors")
}
Err(err) => message = err.to_string(),
}
Err(err) => err.to_string(),
};
let result = json!({
"message": message,