提交 1a944b0d 编写于 作者: P Paul Dicker

Remove pub(crate) from stderr_raw

上级 6464e32e
......@@ -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;
......
......@@ -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) }
......
......@@ -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()
}
......@@ -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()
}
......@@ -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
}
......
......@@ -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()
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册