Skip to content

Commit a1eb7b5

Browse files
committed
chore: move serde impls to module (bytesize-rs#62)
1 parent 05a48ff commit a1eb7b5

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -465,14 +465,4 @@ mod tests {
465465
fn test_to_string() {
466466
assert_to_string("609.0 PB", ByteSize::pb(609), true);
467467
}
468-
469-
#[test]
470-
#[cfg(feature = "serde")]
471-
fn test_serde_json() {
472-
let json = serde_json::to_string(&ByteSize::mib(1)).unwrap();
473-
assert_eq!(json, "\"1.0 MiB\"");
474-
475-
let deserialized: ByteSize = serde_json::from_str(&json).unwrap();
476-
assert_eq!(deserialized.0, 1048576);
477-
}
478468
}

0 commit comments

Comments
 (0)