green: Remove io_error usage

This commit is contained in:
Alex Crichton 2014-01-30 14:37:30 -08:00
parent c0e77dc2ee
commit 2053b69595

View File

@ -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) -> ! {