Skip to content

Commit

Permalink
Remove pub(crate) from stderr_raw
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Feb 23, 2019
1 parent 6464e32 commit 1a944b0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,6 @@ pub use self::stdio::{_print, _eprint};
#[doc(no_inline, hidden)]
pub use self::stdio::{set_panic, set_print};

// Used inside the standard library for panic output.
pub(crate) use self::stdio::stderr_raw;

pub mod prelude;
mod buffered;
mod cursor;
Expand Down
8 changes: 2 additions & 6 deletions src/libstd/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ struct StdoutRaw(stdio::Stdout);
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdio::stderr_raw` function.
///
/// Not exposed, but used inside the standard library for panic output.
pub(crate) struct StderrRaw(stdio::Stderr);
struct StderrRaw(stdio::Stderr);

/// Constructs a new raw handle to the standard input of this process.
///
Expand Down Expand Up @@ -63,9 +61,7 @@ fn stdout_raw() -> io::Result<StdoutRaw> { stdio::Stdout::new().map(StdoutRaw) }
///
/// The returned handle has no external synchronization or buffering layered on
/// top.
///
/// Not exposed, but used inside the standard library for panic output.
pub(crate) fn stderr_raw() -> io::Result<StderrRaw> { stdio::Stderr::new().map(StderrRaw) }
fn stderr_raw() -> io::Result<StderrRaw> { stdio::Stderr::new().map(StderrRaw) }

impl Read for StdinRaw {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { self.0.read(buf) }
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/redox/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE;

pub fn panic_output() -> Option<impl io::Write> {
io::stderr_raw().ok()
Stderr::new().ok()
}
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
pub const STDIN_BUF_SIZE: usize = ::sys_common::io::DEFAULT_BUF_SIZE;

pub fn panic_output() -> Option<impl io::Write> {
io::stderr_raw().ok()
Stderr::new().ok()
}
2 changes: 1 addition & 1 deletion src/libstd/sys/wasm/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn is_ebadf(_err: &io::Error) -> bool {

pub fn panic_output() -> Option<impl io::Write> {
if cfg!(feature = "wasm_syscall") {
io::stderr_raw().ok()
Stderr::new().ok()
} else {
None
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
}

pub fn panic_output() -> Option<impl io::Write> {
io::stderr_raw().ok()
Stderr::new().ok()
}

0 comments on commit 1a944b0

Please sign in to comment.