Skip to content

Commit

Permalink
Add debug derive to HumanTime
Browse files Browse the repository at this point in the history
  • Loading branch information
zuhairp committed Jun 1, 2024
1 parent 1d82727 commit a1f0986
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/human-time/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod macros;
mod recognizers;
mod time_window;

#[derive(Debug)]
pub enum HumanTime {
DateTime(chrono::DateTime<Utc>),
Date(chrono::NaiveDate),
Expand Down
2 changes: 1 addition & 1 deletion src/human-time/src/recognizers/year_recognizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mod tests {
let result = recognize_year("2025").unwrap();
match result {
HumanTime::TimeWindow(TimeWindow::Year(Year { year })) => assert!(2025 == year),
_ => panic!("Got an invalid type"),
_ => panic!("Got an invalid type {:?}", result),
}
}

Expand Down

0 comments on commit a1f0986

Please sign in to comment.