[No-auto] bin/core/diagnostics: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
cba336e1dd
commit
d9d82d7441
1 changed files with 3 additions and 3 deletions
|
@ -92,9 +92,9 @@ impl Diagnostic {
|
||||||
Some(_) => "Non-String type in 'imag.version'".to_owned(),
|
Some(_) => "Non-String type in 'imag.version'".to_owned(),
|
||||||
None => "No version".to_owned(),
|
None => "No version".to_owned(),
|
||||||
})
|
})
|
||||||
.unwrap_or("Error reading version".to_owned()),
|
.unwrap_or_else(|_| "Error reading version".to_owned()),
|
||||||
header_sections: match entry.get_header() {
|
header_sections: match entry.get_header() {
|
||||||
&Value::Table(ref map) => map.keys().count(),
|
Value::Table(ref map) => map.keys().count(),
|
||||||
_ => 0
|
_ => 0
|
||||||
},
|
},
|
||||||
bytecount_content: entry.get_content().as_str().len(),
|
bytecount_content: entry.get_content().as_str().len(),
|
||||||
|
@ -258,7 +258,7 @@ fn get_config(rt: &Runtime, s: &'static str) -> Option<String> {
|
||||||
.map_err(Error::from)
|
.map_err(Error::from)
|
||||||
.map_err_trace_exit_unwrap()
|
.map_err_trace_exit_unwrap()
|
||||||
.map(|opt| match opt {
|
.map(|opt| match opt {
|
||||||
&Value::String(ref s) => s.to_owned(),
|
Value::String(ref s) => s.to_owned(),
|
||||||
_ => {
|
_ => {
|
||||||
error!("Config type wrong: 'rt.progressbar_style' should be a string");
|
error!("Config type wrong: 'rt.progressbar_style' should be a string");
|
||||||
::std::process::exit(1)
|
::std::process::exit(1)
|
||||||
|
|
Loading…
Reference in a new issue