Remove lazy_static
we don't need lazy static here, so remove it and the dependency as well. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
ed457495c8
commit
5ff2c3e8e3
3 changed files with 5 additions and 9 deletions
|
@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" }
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
toml-query = "0.8"
|
toml-query = "0.8"
|
||||||
lazy_static = "1.2"
|
|
||||||
toml = "0.4"
|
toml = "0.4"
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
|
|
||||||
|
|
|
@ -44,12 +44,10 @@ pub trait EntryDate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy_static! {
|
const DATE_HEADER_LOCATION : &'static str = "datetime.value";
|
||||||
static ref DATE_HEADER_LOCATION : &'static str = "datetime.value";
|
const DATE_RANGE_START_HEADER_LOCATION : &'static str = "datetime.range.start";
|
||||||
static ref DATE_RANGE_START_HEADER_LOCATION : &'static str = "datetime.range.start";
|
const DATE_RANGE_END_HEADER_LOCATION : &'static str = "datetime.range.end";
|
||||||
static ref DATE_RANGE_END_HEADER_LOCATION : &'static str = "datetime.range.end";
|
const DATE_FMT : &'static str = "%Y-%m-%dT%H:%M:%S";
|
||||||
static ref DATE_FMT : &'static str = "%Y-%m-%dT%H:%M:%S";
|
|
||||||
}
|
|
||||||
|
|
||||||
impl EntryDate for Entry {
|
impl EntryDate for Entry {
|
||||||
|
|
||||||
|
@ -93,7 +91,7 @@ impl EntryDate for Entry {
|
||||||
self.get_header_mut()
|
self.get_header_mut()
|
||||||
.insert(&DATE_HEADER_LOCATION, Value::String(date))
|
.insert(&DATE_HEADER_LOCATION, Value::String(date))
|
||||||
.context(format_err!("Failed to insert header '{}' in '{}'",
|
.context(format_err!("Failed to insert header '{}' in '{}'",
|
||||||
*DATE_HEADER_LOCATION,
|
DATE_HEADER_LOCATION,
|
||||||
self.get_location()))
|
self.get_location()))
|
||||||
.map_err(Error::from)
|
.map_err(Error::from)
|
||||||
.map(|opt| opt.map(|stri| {
|
.map(|opt| opt.map(|stri| {
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
while_true,
|
while_true,
|
||||||
)]
|
)]
|
||||||
|
|
||||||
#[macro_use] extern crate lazy_static;
|
|
||||||
#[macro_use] extern crate failure;
|
#[macro_use] extern crate failure;
|
||||||
extern crate chrono;
|
extern crate chrono;
|
||||||
extern crate toml_query;
|
extern crate toml_query;
|
||||||
|
|
Loading…
Reference in a new issue