aboutsummaryrefslogtreecommitdiff
path: root/apps/cassiopeia/src/format/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/cassiopeia/src/format/parser.rs')
-rw-r--r--apps/cassiopeia/src/format/parser.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/cassiopeia/src/format/parser.rs b/apps/cassiopeia/src/format/parser.rs
index bb2c56be0f33..430fee6332a7 100644
--- a/apps/cassiopeia/src/format/parser.rs
+++ b/apps/cassiopeia/src/format/parser.rs
@@ -4,7 +4,7 @@
//! parsed time file.
use crate::format::{LineLexer, LineToken, Token};
-use chrono::{NaiveDate, DateTime, FixedOffset as Offset};
+use chrono::{DateTime, FixedOffset as Offset, NaiveDate};
use std::collections::BTreeMap;
use std::iter::Iterator;
@@ -36,7 +36,7 @@ impl LineCfg {
pub(crate) fn parse<'l>(lex: LineLexer<'l>) -> LineCfg {
use LineCfg::*;
use Token as T;
-
+
#[cfg_attr(rustfmt, rustfmt_skip)]
lex.get_all().into_iter().fold(Ignore, |cfg, tok| match (cfg, tok) {
// If the first token is a comment, we ignore it
@@ -72,5 +72,8 @@ fn parse_datetime(slice: &str) -> Option<DateTime<Offset>> {
}
fn parse_date(slice: &str) -> Option<NaiveDate> {
- Some(NaiveDate::parse_from_str(slice, "%Y-%m-%d").expect("Failed to parse date; invalid format!"))
+ Some(
+ NaiveDate::parse_from_str(slice, "%Y-%m-%d")
+ .expect("Failed to parse date; invalid format!"),
+ )
}