mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-08 05:47:40 +00:00
green: Remove io_error usage
This commit is contained in:
parent
c0e77dc2ee
commit
2053b69595
@ -56,16 +56,17 @@ pub fn dumb_println(args: &fmt::Arguments) {
|
|||||||
|
|
||||||
struct Stderr;
|
struct Stderr;
|
||||||
impl io::Writer for Stderr {
|
impl io::Writer for Stderr {
|
||||||
fn write(&mut self, data: &[u8]) {
|
fn write(&mut self, data: &[u8]) -> io::IoResult<()> {
|
||||||
unsafe {
|
unsafe {
|
||||||
libc::write(libc::STDERR_FILENO,
|
libc::write(libc::STDERR_FILENO,
|
||||||
data.as_ptr() as *libc::c_void,
|
data.as_ptr() as *libc::c_void,
|
||||||
data.len() as libc::size_t);
|
data.len() as libc::size_t);
|
||||||
}
|
}
|
||||||
|
Ok(()) // just ignore the result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut w = Stderr;
|
let mut w = Stderr;
|
||||||
fmt::writeln(&mut w as &mut io::Writer, args);
|
let _ = fmt::writeln(&mut w as &mut io::Writer, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn abort(msg: &str) -> ! {
|
pub fn abort(msg: &str) -> ! {
|
||||||
|
Loading…
Reference in New Issue
Block a user