mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-05 07:27:46 +00:00
refactor/polish ~ fix cargo clippy
complaint (bind_instead_of_map)
This commit is contained in:
parent
326ff36793
commit
305c3cbcdb
1 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ fn options(args: &[String]) -> Result<Options> {
|
||||||
|
|
||||||
opts.parse(&args[1..])
|
opts.parse(&args[1..])
|
||||||
.map_err(|e| Error::new(ErrorKind::Other, format!("{}", e)))
|
.map_err(|e| Error::new(ErrorKind::Other, format!("{}", e)))
|
||||||
.and_then(|m| {
|
.map(|m| {
|
||||||
let version = format!("{} {}", NAME, VERSION);
|
let version = format!("{} {}", NAME, VERSION);
|
||||||
let arguments = "[OPTION]... [FILE]...";
|
let arguments = "[OPTION]... [FILE]...";
|
||||||
let brief = "Copy standard input to each FILE, and also to standard output.";
|
let brief = "Copy standard input to each FILE, and also to standard output.";
|
||||||
|
@ -65,13 +65,13 @@ fn options(args: &[String]) -> Result<Options> {
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
Ok(Options {
|
Options {
|
||||||
program: NAME.to_owned(),
|
program: NAME.to_owned(),
|
||||||
append: m.opt_present("append"),
|
append: m.opt_present("append"),
|
||||||
ignore_interrupts: m.opt_present("ignore-interrupts"),
|
ignore_interrupts: m.opt_present("ignore-interrupts"),
|
||||||
print_and_exit: to_print,
|
print_and_exit: to_print,
|
||||||
files: names,
|
files: names,
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
.map_err(|message| warn(format!("{}", message).as_ref()))
|
.map_err(|message| warn(format!("{}", message).as_ref()))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue