mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-07 05:15:02 +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;
|
||||
impl io::Writer for Stderr {
|
||||
fn write(&mut self, data: &[u8]) {
|
||||
fn write(&mut self, data: &[u8]) -> io::IoResult<()> {
|
||||
unsafe {
|
||||
libc::write(libc::STDERR_FILENO,
|
||||
data.as_ptr() as *libc::c_void,
|
||||
data.len() as libc::size_t);
|
||||
}
|
||||
Ok(()) // just ignore the result
|
||||
}
|
||||
}
|
||||
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) -> ! {
|
||||
|
Loading…
Reference in New Issue
Block a user