refactor: change unwrap()s to expects() and deny in clippy
Signed-off-by: Stephen Waits <steve@waits.net>
This commit is contained in:
1 parent
1e1365ee13
commit
f5ddbc0533
4 files changed
+17
-8
No files matched your search
+4
-1
@@ -285,7 +285,10 @@ mod tests {
|
||||
fn test_serde() {
|
||||
let a = Vector::<f32, 3>::from([1.0, 2.0, 3.0]);
|
||||
let s = serde_json::to_string(&a);
|
||||
assert_eq!(s.as_ref().unwrap(), "{\"position\":[1.0,2.0,3.0]}");
|
||||
assert_eq!(
|
||||
s.as_ref().expect("serialization failed in test"),
|
||||
"{\"position\":[1.0,2.0,3.0]}"
|
||||
);
|
||||
assert!(s.is_ok());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user