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 593289f commit b479bf2Copy full SHA for b479bf2
library/std/src/io/mod.rs
@@ -1502,12 +1502,12 @@ impl<'a> IoSlice<'a> {
1502
/// let data = b"abcdef";
1503
///
1504
/// let mut io_slice = IoSlice::new(data);
1505
- /// let tail = io_slice.as_bytes()[3..];
+ /// let tail = io_slice.into_bytes()[3..];
1506
1507
/// // This works because `tail` doesn't borrow `io_slice`
1508
/// io_slice = IoSlice::new(tail);
1509
1510
- /// assert_eq!(io_slice.as_bytes(), b"def");
+ /// assert_eq!(io_slice.into_bytes(), b"def");
1511
/// ```
1512
#[unstable(feature = "io_slice_as_bytes", issue = "111277")]
1513
#[inline]
0 commit comments