diff --git a/components/util/opts.rs b/components/util/opts.rs index 8cc67c1d217..11f42fbf8b9 100644 --- a/components/util/opts.rs +++ b/components/util/opts.rs @@ -435,9 +435,7 @@ pub enum OutputOptions { } fn args_fail(msg: &str) -> ! { - let mut stderr = io::stderr(); - stderr.write_all(msg.as_bytes()).unwrap(); - stderr.write_all(b"\n").unwrap(); + writeln!(io::stderr(), "{}", msg).unwrap(); process::exit(1) }