Remove pub(crate) from stderr_raw

This commit is contained in:
Paul Dicker 2019-02-23 12:11:10 +01:00
parent 6464e32ea9
commit 1a944b0d5b
6 changed files with 6 additions and 13 deletions

View File

@ -286,9 +286,6 @@
#[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;

View File

@ -32,9 +32,7 @@
///
/// 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.
///
@ -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) }

View File

@ -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()
}

View File

@ -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()
}

View File

@ -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
}

View File

@ -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()
}