Skip to content

Commit df0f29d

Browse files
committed
Clean up naming in from_slice return value in example
The second element of the returned tuple is the number of bytes consumed as stated in the docs of this function.
1 parent ca67457 commit df0f29d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//!
1717
//! // Serialized JSON data can be easily deserialized into Rust types.
1818
//! let message = b"{\"value\":10,\"message\":\"Hello, World!\"}";
19-
//! let (data, _remainder) = serde_json_core::from_slice::<Data<'_>>(message).unwrap();
19+
//! let (data, _consumed) = serde_json_core::from_slice::<Data<'_>>(message).unwrap();
2020
//! assert_eq!(data.value, 10);
2121
//! assert_eq!(data.message, "Hello, World!");
2222
//!

0 commit comments

Comments
 (0)