Stabilize BufRead::skip_until

This commit is contained in:
okaneco 2024-10-04 14:56:15 -04:00
parent c39f318c5e
commit e08002f6d0

View File

@ -2382,8 +2382,6 @@ fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize> {
/// about Ferris from a binary string, skipping the fun fact: /// about Ferris from a binary string, skipping the fun fact:
/// ///
/// ``` /// ```
/// #![feature(bufread_skip_until)]
///
/// use std::io::{self, BufRead}; /// use std::io::{self, BufRead};
/// ///
/// let mut cursor = io::Cursor::new(b"Ferris\0Likes long walks on the beach\0Crustacean\0"); /// let mut cursor = io::Cursor::new(b"Ferris\0Likes long walks on the beach\0Crustacean\0");
@ -2407,7 +2405,7 @@ fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize> {
/// assert_eq!(num_bytes, 11); /// assert_eq!(num_bytes, 11);
/// assert_eq!(animal, b"Crustacean\0"); /// assert_eq!(animal, b"Crustacean\0");
/// ``` /// ```
#[unstable(feature = "bufread_skip_until", issue = "111735")] #[stable(feature = "bufread_skip_until", since = "CURRENT_RUSTC_VERSION")]
fn skip_until(&mut self, byte: u8) -> Result<usize> { fn skip_until(&mut self, byte: u8) -> Result<usize> {
skip_until(self, byte) skip_until(self, byte)
} }