Use write_all() to write to write an entire string rather than write().

https://github.com/rust-lang-nursery/rust-clippy/wiki#unused_io_amount
This commit is contained in:
Dan Gohman
2017-09-06 08:50:57 -07:00
parent 27e9e16077
commit 45b093ea59

View File

@@ -96,7 +96,7 @@ fn main() {
if !msg.ends_with('\n') { if !msg.ends_with('\n') {
msg.push('\n'); msg.push('\n');
} }
io::stderr().write(msg.as_bytes()).unwrap(); io::stderr().write_all(msg.as_bytes()).unwrap();
process::exit(1); process::exit(1);
} }
} }