From 663bb7f6c02ec6b4aa4b2668dfcac86895e73215 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 27 Aug 2019 10:49:07 +0200 Subject: [PATCH] [Auto] lib/entry/datetime: Fix Clippy warnings Signed-off-by: flip1995 Signed-off-by: Matthias Beyer --- .../libimagentrydatetime/src/datepath/compiler.rs | 4 ++-- 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(|_| ())