mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-27 13:59:53 +00:00
Use deref coercions when possible
This commit is contained in:
1 parent
361acd37d0
commit
3022d7301a
14 files changed
+54
-54
No files matched your search
@@ -26,6 +26,6 @@ fn test_json_struct() {
|
||||
let s = serde::json::to_string(&input).unwrap();
|
||||
assert_eq!(s.as_slice(), r#"{"$schema":"a","title":"b","type":3}"#);
|
||||
|
||||
let output: Test = serde::json::from_str(s.as_slice()).unwrap();
|
||||
let output: Test = serde::json::from_str(&s).unwrap();
|
||||
assert_eq!(input, output);
|
||||
}
|
||||
Reference in new issue
Block a user