From b564d0141dfe6828faf9ce7290f6d7b255f5bda6 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sun, 9 Oct 2016 13:54:45 -0400 Subject: [PATCH] Simplify logic for writing to stderr. --- components/util/opts.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) }