We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25c01eb commit cf9256fCopy full SHA for cf9256f
library/std/src/io/mod.rs
@@ -1303,12 +1303,12 @@ impl<'a> IoSlice<'a> {
1303
/// let data = b"abcdef";
1304
///
1305
/// let mut io_slice = IoSlice::new(data);
1306
- /// let tail = io_slice.as_bytes()[3..];
+ /// let tail = io_slice.into_bytes()[3..];
1307
1308
/// // This works because `tail` doesn't borrow `io_slice`
1309
/// io_slice = IoSlice::new(tail);
1310
1311
- /// assert_eq!(io_slice.as_bytes(), b"def");
+ /// assert_eq!(io_slice.into_bytes(), b"def");
1312
/// ```
1313
#[unstable(feature = "io_slice_as_bytes", issue = "111277")]
1314
#[inline]
0 commit comments