delete Stdin::split
forwarder
This commit is contained in:
parent
74fbbefea8
commit
fdf930ce01
1 changed files with 1 additions and 24 deletions
|
@ -7,7 +7,7 @@ use crate::io::prelude::*;
|
|||
|
||||
use crate::cell::{Cell, RefCell};
|
||||
use crate::fmt;
|
||||
use crate::io::{self, BufReader, IoSlice, IoSliceMut, LineWriter, Lines, Split};
|
||||
use crate::io::{self, BufReader, IoSlice, IoSliceMut, LineWriter, Lines};
|
||||
use crate::lazy::SyncOnceCell;
|
||||
use crate::pin::Pin;
|
||||
use crate::sync::atomic::{AtomicBool, Ordering};
|
||||
|
@ -465,29 +465,6 @@ impl Stdin {
|
|||
pub fn lines(self) -> Lines<StdinLock<'static>> {
|
||||
self.into_locked().lines()
|
||||
}
|
||||
|
||||
/// Consumes this handle and returns an iterator over input bytes,
|
||||
/// split at the specified byte value.
|
||||
///
|
||||
/// For detailed semantics of this method, see the documentation on
|
||||
/// [`BufRead::split`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(stdin_forwarders)]
|
||||
/// use std::io;
|
||||
///
|
||||
/// let splits = io::stdin().split(b'-');
|
||||
/// for split in splits {
|
||||
/// println!("got a chunk: {}", String::from_utf8_lossy(&split.unwrap()));
|
||||
/// }
|
||||
/// ```
|
||||
#[must_use = "`self` will be dropped if the result is not used"]
|
||||
#[unstable(feature = "stdin_forwarders", issue = "87096")]
|
||||
pub fn split(self, byte: u8) -> Split<StdinLock<'static>> {
|
||||
self.into_locked().split(byte)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
|
|
Loading…
Add table
Reference in a new issue