diff --git a/src/main.rs b/src/main.rs index 7062682..4e3c45a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,6 +47,19 @@ fn add(f: &String, x: &Option, tag: &Option) -> Result<(), Strin Ok(()) } +#[derive(Debug, Serialize)] +struct Log { + t: String, + d: u8, + xs: Vec, +} +#[derive(Debug, Serialize)] +struct LogX { + d: u8, + x: String, + xs: Vec, +} + fn log(f: &String, since: &Option) -> Result<(), String> { let since = parse_time(since)?; let tsheet = load(&f)?; @@ -126,7 +139,7 @@ mod test_save_load { X{t: 2, x: "ghi".to_string(), tag: "".to_string()}, ]}; assert_eq!( - load("./src/testdata/standalone.yaml".to_string()).expect("cant load standalone.yaml"), + load(&"./src/testdata/standalone.yaml".to_string()).expect("cant load standalone.yaml"), want, );