diff options
author | flip1995 <hello@philkrones.com> | 2019-08-27 10:49:07 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-08-28 18:18:40 +0200 |
commit | 663bb7f6c02ec6b4aa4b2668dfcac86895e73215 (patch) | |
tree | 8d7013fa457974cf1be02a45eda215031b38a584 /lib/entry | |
parent | f175d3db17125104b6349cd1c8986ea9913e137a (diff) |
[Auto] lib/entry/datetime: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib/entry')
-rw-r--r-- | lib/entry/libimagentrydatetime/src/datepath/compiler.rs | 4 | ||||
-rw-r--r-- | lib/entry/libimagentrydatetime/src/datetime.rs | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs index 1f06f5ec..de47df8f 100644 --- a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs +++ b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs @@ -38,8 +38,8 @@ impl DatePathCompiler { pub fn new(accuracy: Accuracy, format: Format) -> DatePathCompiler { DatePathCompiler { - accuracy : accuracy, - format : format, + accuracy, + format, } } diff --git a/lib/entry/libimagentrydatetime/src/datetime.rs b/lib/entry/libimagentrydatetime/src/datetime.rs index 17bbdaa0..3ca59d1e 100644 --- a/lib/entry/libimagentrydatetime/src/datetime.rs +++ b/lib/entry/libimagentrydatetime/src/datetime.rs @@ -44,10 +44,10 @@ pub trait EntryDate { } -const DATE_HEADER_LOCATION : &'static str = "datetime.value"; -const DATE_RANGE_START_HEADER_LOCATION : &'static str = "datetime.range.start"; -const DATE_RANGE_END_HEADER_LOCATION : &'static str = "datetime.range.end"; -const DATE_FMT : &'static str = "%Y-%m-%dT%H:%M:%S"; +const DATE_HEADER_LOCATION : &str = "datetime.value"; +const DATE_RANGE_START_HEADER_LOCATION : &str = "datetime.range.start"; +const DATE_RANGE_END_HEADER_LOCATION : &str = "datetime.range.end"; +const DATE_FMT : &str = "%Y-%m-%dT%H:%M:%S"; impl EntryDate for Entry { @@ -114,7 +114,7 @@ impl EntryDate for Entry { /// header in an inconsistent state. /// fn delete_date_range(&mut self) -> Result<()> { - let _ = self + self .get_header_mut() .delete(&DATE_RANGE_START_HEADER_LOCATION) .map(|_| ()) |