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:
@@ -96,7 +96,7 @@ fn main() {
|
||||
if !msg.ends_with('\n') {
|
||||
msg.push('\n');
|
||||
}
|
||||
io::stderr().write(msg.as_bytes()).unwrap();
|
||||
io::stderr().write_all(msg.as_bytes()).unwrap();
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user