diff --git a/lib/entry/libimagentrydatetime/Cargo.toml b/lib/entry/libimagentrydatetime/Cargo.toml index 726882c4..b3185036 100644 --- a/lib/entry/libimagentrydatetime/Cargo.toml +++ b/lib/entry/libimagentrydatetime/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] chrono = "0.4" toml-query = "0.8" -lazy_static = "1.2" toml = "0.4" failure = "0.1" diff --git a/lib/entry/libimagentrydatetime/src/datetime.rs b/lib/entry/libimagentrydatetime/src/datetime.rs index d7fcb828..17bbdaa0 100644 --- a/lib/entry/libimagentrydatetime/src/datetime.rs +++ b/lib/entry/libimagentrydatetime/src/datetime.rs @@ -44,12 +44,10 @@ pub trait EntryDate { } -lazy_static! { - static ref DATE_HEADER_LOCATION : &'static str = "datetime.value"; - static ref DATE_RANGE_START_HEADER_LOCATION : &'static str = "datetime.range.start"; - static ref DATE_RANGE_END_HEADER_LOCATION : &'static str = "datetime.range.end"; - static ref DATE_FMT : &'static str = "%Y-%m-%dT%H:%M:%S"; -} +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"; impl EntryDate for Entry { @@ -93,7 +91,7 @@ impl EntryDate for Entry { self.get_header_mut() .insert(&DATE_HEADER_LOCATION, Value::String(date)) .context(format_err!("Failed to insert header '{}' in '{}'", - *DATE_HEADER_LOCATION, + DATE_HEADER_LOCATION, self.get_location())) .map_err(Error::from) .map(|opt| opt.map(|stri| { diff --git a/lib/entry/libimagentrydatetime/src/lib.rs b/lib/entry/libimagentrydatetime/src/lib.rs index 3e16e031..2c7e17e1 100644 --- a/lib/entry/libimagentrydatetime/src/lib.rs +++ b/lib/entry/libimagentrydatetime/src/lib.rs @@ -37,7 +37,6 @@ while_true, )] -#[macro_use] extern crate lazy_static; #[macro_use] extern crate failure; extern crate chrono; extern crate toml_query;