From cf9256fc2b37e1726f10110f18917f0655799e52 Mon Sep 17 00:00:00 2001 From: Nathan West Date: Mon, 8 May 2023 17:37:36 -0400 Subject: [PATCH] Fix broken test, probably --- library/std/src/io/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index af4c31254324..280f091dc2c0 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -1303,12 +1303,12 @@ impl<'a> IoSlice<'a> { /// let data = b"abcdef"; /// /// let mut io_slice = IoSlice::new(data); - /// let tail = io_slice.as_bytes()[3..]; + /// let tail = io_slice.into_bytes()[3..]; /// /// // This works because `tail` doesn't borrow `io_slice` /// io_slice = IoSlice::new(tail); /// - /// assert_eq!(io_slice.as_bytes(), b"def"); + /// assert_eq!(io_slice.into_bytes(), b"def"); /// ``` #[unstable(feature = "io_slice_as_bytes", issue = "111277")] #[inline]