Skip to content
Myr

Fix warnings

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

authored by sharkdp · committed by sharkdp · parent a0505bd · Browse files · 2 files+3 added−6 removed
This commit

State

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

Diff stats

2 files+3 added−6 removed

  • other:+3 added−6 removed

2 files+3 added−6 removed

modified:src/internal/filter/size.rs+3 added-3 removed
78 unmodified lines
79 )*80 };81 }8283 /// Parsing and size conversion tests data. Ensure that each type gets properly interpreted.84 /// Call with higher base values to ensure expected multiplication (only need a couple)83 // Parsing and size conversion tests data. Ensure that each type gets properly interpreted.84 // Call with higher base values to ensure expected multiplication (only need a couple)85 gen_size_filter_parse_test! {86 byte_plus: ("+1b", SizeFilter::Min(1)),87 byte_plus_multiplier: ("+10b", SizeFilter::Min(10)),88 byte_minus: ("-1b", SizeFilter::Max(1)),
78 unmodified lines
167 )*168 };169 }170171 /// Invalid parse data171 // Invalid parse data172 gen_size_filter_failure! {173 ensure_missing_symbol_returns_none: "10M",174 ensure_missing_number_returns_none: "+g",175 ensure_missing_unit_returns_none: "+18",
34 unmodified lines
modified:src/internal/filter/time.rs-3 removed
7 unmodified lines
8}910impl TimeFilter {11 fn from_str(ref_time: &SystemTime, s: &str) -> Option<SystemTime> {12 use humantime;12 humantime::parse_duration(s)13 .map(|duration| *ref_time - duration)14 .or_else(|_| humantime::parse_rfc3339_weak(s))15 .ok()
21 unmodified lines
37 use std::time::Duration;3839 #[test]40 fn is_time_filter_applicable() {42 use humantime;4341 let ref_time = humantime::parse_rfc3339("2010-10-10T10:10:10Z").unwrap();42 assert!(TimeFilter::after(&ref_time, "1min")43 .unwrap()44 .applies_to(&ref_time));
35 unmodified lines