Skip to content

Commit

Permalink
delete Stdin::split forwarder
Browse files Browse the repository at this point in the history
  • Loading branch information
tlyu committed Jan 20, 2022
1 parent 74fbbef commit fdf930c
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions library/std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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")]
Expand Down

0 comments on commit fdf930c

Please sign in to comment.