diff --git a/src/main.rs b/src/main.rs index eae0046..9a8f373 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,9 +6,10 @@ fn main() { #[derive(Debug, PartialEq, Serialize, Deserialize)] struct Storage { - adds: []Add, + adds: Vec, } +#[derive(Debug, PartialEq, Serialize, Deserialize)] struct Add { t: i64, add: String, @@ -27,10 +28,10 @@ mod tests { fn test_testdata_standalone_yaml() { assert_eq!( load_storage("./testdata/standalone.yaml".to_string()).expect("cant load standalone.yaml"), - Storage{adds: { + Storage{adds: vec![ Add{t: 1, add: "def".to_string(), tag: "abc".to_string()}, Add{t: 2, add: "ghi".to_string(), tag: "".to_string()}, - }}, + ]}, ); } }