Skip to content
Myr

Run formatting

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nathan Bellows · committed by Nathan Bellows · parent b0a8848 · Browse files · 1 file+15 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+15 added−9 removed

  • other:+15 added−9 removed

1 file+15 added−9 removed

modified:src/filter/time.rs+15 added-9 removed
149 unmodified lines
150 let t1m_ago = ref_time - Duration::from_secs(60);151 let t1s_later = ref_time + Duration::from_secs(1);152 // Timestamp only supported via '@' prefix153 assert!(TimeFilter::before(&ref_time, &ref_timestamp.to_string()).is_none());154 assert!(TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp))155 .unwrap()156 .applies_to(&t1m_ago));157 assert!(!TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp))158 .unwrap()159 .applies_to(&t1s_later));160 assert!(!TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp))161 .unwrap()162 .applies_to(&t1m_ago));154 assert!(155 TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp))156 .unwrap()157 .applies_to(&t1m_ago)158 );159 assert!(160 !TimeFilter::before(&ref_time, &format!("@{}", ref_timestamp))161 .unwrap()162 .applies_to(&t1s_later)163 );164 assert!(165 !TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp))166 .unwrap()167 .applies_to(&t1m_ago)168 );169 assert!(TimeFilter::after(&ref_time, &format!("@{}", ref_timestamp))170 .unwrap()171 .applies_to(&t1s_later));172 }
1 unmodified line