Skip to content

Commit

Permalink
Rollup merge of rust-lang#93134 - tlyu:delete-stdin-split, r=Amanieu
Browse files Browse the repository at this point in the history
delete `Stdin::split` forwarder

Part of rust-lang#87096. Delete the `Stdin::split` forwarder because it's seen as too niche to expose at this level.

`@rustbot` label T-libs-api A-io
  • Loading branch information
matthiaskrgr committed Jan 21, 2022
2 parents 9474c74 + fdf930c commit 081d65f
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 081d65f

Please sign in to comment.