diff options
author | flip1995 <hello@philkrones.com> | 2019-08-27 10:05:34 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-08-28 18:18:41 +0200 |
commit | 1bb6f452e93149f67f8d03abf2fc2a11a9ce4a5c (patch) | |
tree | 6ee78dd52d8047dd521f4816e157251b02b6c40b /bin/domain/imag-diary/src/create.rs | |
parent | 397bcd43d05d98291afc6e29fb000b82df2d00f1 (diff) |
[No-auto] bin/domain/diary: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/domain/imag-diary/src/create.rs')
-rw-r--r-- | bin/domain/imag-diary/src/create.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/domain/imag-diary/src/create.rs b/bin/domain/imag-diary/src/create.rs index b7da6c16..8a3f80a3 100644 --- a/bin/domain/imag-diary/src/create.rs +++ b/bin/domain/imag-diary/src/create.rs @@ -126,7 +126,7 @@ fn create_id_from_clispec(create: &ArgMatches, timed_type: Timed) -> NaiveDateTi .map_err(|_| warn!("Could not parse minute: '{}'", s)) .ok() }) - .unwrap_or(ndt.minute()); + .unwrap_or_else(|| ndt.minute()); ndt.with_minute(min) .unwrap_or_else(|| { @@ -146,7 +146,7 @@ fn create_id_from_clispec(create: &ArgMatches, timed_type: Timed) -> NaiveDateTi .map_err(|_| warn!("Could not parse minute: '{}'", s)) .ok() }) - .unwrap_or(ndt.minute()); + .unwrap_or_else(|| ndt.minute()); let sec = create .value_of("second") @@ -156,7 +156,7 @@ fn create_id_from_clispec(create: &ArgMatches, timed_type: Timed) -> NaiveDateTi .map_err(|_| warn!("Could not parse second: '{}'", s)) .ok() }) - .unwrap_or(ndt.second()); + .unwrap_or_else(|| ndt.second()); ndt.with_minute(min) .unwrap_or_else(|| { |