Skip to content

Commit cf9256f

Browse files
authored
Fix broken test, probably
1 parent 25c01eb commit cf9256f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/io/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1303,12 +1303,12 @@ impl<'a> IoSlice<'a> {
13031303
/// let data = b"abcdef";
13041304
///
13051305
/// let mut io_slice = IoSlice::new(data);
1306-
/// let tail = io_slice.as_bytes()[3..];
1306+
/// let tail = io_slice.into_bytes()[3..];
13071307
///
13081308
/// // This works because `tail` doesn't borrow `io_slice`
13091309
/// io_slice = IoSlice::new(tail);
13101310
///
1311-
/// assert_eq!(io_slice.as_bytes(), b"def");
1311+
/// assert_eq!(io_slice.into_bytes(), b"def");
13121312
/// ```
13131313
#[unstable(feature = "io_slice_as_bytes", issue = "111277")]
13141314
#[inline]

0 commit comments

Comments
 (0)