diff --git a/src/main.rs b/src/main.rs index 19be4f5..0d30c9b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,7 +81,7 @@ mod test_save_load { } impl TSheet { - fn from(&self, t: SystemTime) -> TSheet { + fn since(&self, t: SystemTime) -> TSheet { let mut result = TSheet{xs: vec![]}; self.xs.iter() .filter(|x| x.ts() >= t) @@ -101,7 +101,7 @@ mod test_tsheet { use super::*; #[test] - fn test_tsheet_from_date() { + fn test_tsheet_since_date() { let given = TSheet{xs: vec![ X{t: 1, x: "def".to_string(), tag: "abc".to_string()}, X{t: 2, x: "ghi".to_string(), tag: "".to_string()}, @@ -111,7 +111,7 @@ mod test_tsheet { X{t: 2, x: "ghi".to_string(), tag: "".to_string()}, X{t: 3, x: "jkl".to_string(), tag: "".to_string()}, ]}; - let got = given.from(UNIX_EPOCH.add(Duration::from_secs(2))); + let got = given.since(UNIX_EPOCH.add(Duration::from_secs(2))); assert_eq!(got, want); } }