fixed rustfmt warnings
This commit is contained in:
committed by
Siegfried Kienzle
parent
cef96956a4
commit
733068dc8d
@@ -98,13 +98,19 @@ fn main() {
|
||||
{
|
||||
let mut ap = ArgumentParser::new();
|
||||
ap.set_description(env!("CARGO_PKG_DESCRIPTION"));
|
||||
ap.refer(&mut min).add_option(&["--min"], Store, "Sleep period start");
|
||||
ap.refer(&mut max).add_option(&["--max"], Store, "Sleep period end");
|
||||
ap.refer(&mut step).add_option(&["--step"], Store, "Sleep period step size");
|
||||
ap.refer(&mut count).add_option(&["--loop"], Store, "Count of measurements per period");
|
||||
ap.refer(&mut min)
|
||||
.add_option(&["--min"], Store, "Sleep period start");
|
||||
ap.refer(&mut max)
|
||||
.add_option(&["--max"], Store, "Sleep period end");
|
||||
ap.refer(&mut step)
|
||||
.add_option(&["--step"], Store, "Sleep period step size");
|
||||
ap.refer(&mut count)
|
||||
.add_option(&["--loop"], Store, "Count of measurements per period");
|
||||
#[cfg(target_os = "linux")]
|
||||
ap.refer(&mut realtime).add_option(&["--rt"], StoreTrue, "Set realtime priority");
|
||||
ap.refer(&mut output).add_option(&["-o", "--out"], Store, "Output file");
|
||||
ap.refer(&mut realtime)
|
||||
.add_option(&["--rt"], StoreTrue, "Set realtime priority");
|
||||
ap.refer(&mut output)
|
||||
.add_option(&["-o", "--out"], Store, "Output file");
|
||||
ap.add_option(&["-V", "--version"],
|
||||
Print(env!("CARGO_PKG_VERSION").to_string()),
|
||||
"Show version");
|
||||
@@ -141,10 +147,9 @@ fn main() {
|
||||
match file.as_ref() {
|
||||
Some(mut f) => {
|
||||
let value = format!("{: >9} {}\n", duration, duration_to_ns(max_delay.1));
|
||||
f.write_all(value.as_bytes()).expect(format!("Write value '{}' to '{}' file failed",
|
||||
value,
|
||||
output)
|
||||
.as_str());
|
||||
f.write_all(value.as_bytes())
|
||||
.expect(format!("Write value '{}' to '{}' file failed", value, output)
|
||||
.as_str());
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user