diff --git a/tests/core/serde.rs b/tests/core/serde.rs index c209e35c..781ace77 100644 --- a/tests/core/serde.rs +++ b/tests/core/serde.rs @@ -14,7 +14,8 @@ macro_rules! test_serde( fn $test() { let v: $ty = rand::random(); let serialized = serde_json::to_string(&v).unwrap(); - assert_eq!(v, serde_json::from_str(&serialized).unwrap()); + let deserialized: $ty = serde_json::from_str(&serialized).unwrap(); + assert_eq!(v, deserialized); } )*} ); @@ -23,7 +24,8 @@ macro_rules! test_serde( fn serde_dmatrix() { let v: DMatrix = DMatrix::new_random(3, 4); let serialized = serde_json::to_string(&v).unwrap(); - assert_eq!(v, serde_json::from_str(&serialized).unwrap()); + let deserialized: DMatrix = serde_json::from_str(&serialized).unwrap(); + assert_eq!(v, deserialized); } test_serde!(