mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
refactor/timeout ~ fix cargo clippy
complaint (clippy::needless_borrow)
This commit is contained in:
parent
6e98ea78ac
commit
a8a2b3ec84
1 changed files with 2 additions and 2 deletions
|
@ -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),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue