We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ffc4c8 commit 6537ee3Copy full SHA for 6537ee3
examples/tweet.rs
@@ -25,10 +25,10 @@ fn main() {
25
// Serialize and and deserialize from byte values or strings
26
let _: File = serde_json::from_str(
27
r#"{
28
- "name": "Hello.txt",
29
- "size": "12.92 gigabytes",
30
- "disk_size": 12920000000
31
- }"#,
+ "name": "Hello.txt",
+ "size": "12.92 gigabytes",
+ "disk_size": 12920000000
+ }"#,
32
)
33
.unwrap();
34
}
src/serde.rs
@@ -62,8 +62,7 @@ impl<'de> de::Visitor<'de> for SizeVisitor {
62
where
63
E: de::Error,
64
{
65
- Size::from_str(value)
66
- .map_err(|_| E::custom(format!("Invalid size: \"{value}\"")))
+ Size::from_str(value).map_err(|_| E::custom(format!("Invalid size: \"{value}\"")))
67
68
69
0 commit comments