[Auto] lib/etc/util: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
bde29b7242
commit
670a0ff6d7
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ use chrono::format::ParseError;
|
||||||
|
|
||||||
pub const NAIVE_DATE_STRING_FORMAT : &str = "%Y-%m-%d";
|
pub const NAIVE_DATE_STRING_FORMAT : &str = "%Y-%m-%d";
|
||||||
|
|
||||||
pub fn date_to_string(ndt: &NaiveDate) -> String {
|
pub fn date_to_string(ndt: NaiveDate) -> String {
|
||||||
ndt.format(NAIVE_DATE_STRING_FORMAT).to_string()
|
ndt.format(NAIVE_DATE_STRING_FORMAT).to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ impl IntoKeyValue<String, String> for String {
|
||||||
};
|
};
|
||||||
|
|
||||||
key.and_then(|k| {
|
key.and_then(|k| {
|
||||||
value.and_then(|v| Some(KeyValue::new(String::from(k.as_str()), String::from(v))))
|
value.map(|v| KeyValue::new(String::from(k.as_str()), String::from(v)))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue