1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

refactor/timeout ~ fix cargo clippy complaint (clippy::needless_borrow)

This commit is contained in:
Roy Ivy III 2021-06-06 13:54:09 -05:00
parent 6e98ea78ac
commit a8a2b3ec84

View file

@ -55,7 +55,7 @@ impl Config {
fn from(options: clap::ArgMatches) -> Config { fn from(options: clap::ArgMatches) -> Config {
let signal = match options.value_of(options::SIGNAL) { let signal = match options.value_of(options::SIGNAL) {
Some(signal_) => { Some(signal_) => {
let signal_result = signal_by_name_or_value(&signal_); let signal_result = signal_by_name_or_value(signal_);
match signal_result { match signal_result {
None => { None => {
unreachable!("invalid signal '{}'", signal_); unreachable!("invalid signal '{}'", signal_);
@ -67,7 +67,7 @@ impl Config {
}; };
let kill_after: Duration = match options.value_of(options::KILL_AFTER) { let kill_after: Duration = match options.value_of(options::KILL_AFTER) {
Some(time) => uucore::parse_time::from_str(&time).unwrap(), Some(time) => uucore::parse_time::from_str(time).unwrap(),
None => Duration::new(0, 0), None => Duration::new(0, 0),
}; };