about summary refs log tree commit diff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2016-04-14 01:39:39 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2016-04-14 01:39:39 +0300
commitb1efb3a39e23b4ccbc4feef0a30c02441a2384e9 (patch)
tree0a9727f1a8f1e33fb898e7507325064c67e1b815 /src/lib.rs
parent14775eb046b245525c28815033cb85ac646f54c6 (diff)
don't silence error unnecessary
This `if` was used to separate error output from the formatting output, when they both used stdout. It was useful for integration with tools, which can submit input to stdin and read pretty printed result from stdout without worrying about errors intermingled with the actual result. 

But now we write errors to `stderr`, so the problem disappears and we can safely remove this `if`.

Errors should never pass silently, unless explicitly silenced.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 92b6ffb8527..d0ff4be7241 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -422,11 +422,7 @@ pub enum Input {
 
 pub fn run(input: Input, config: &Config) {
     let (file_map, report) = format_input(input, config);
-
-    let ignore_errors = config.write_mode == WriteMode::Plain;
-    if !ignore_errors {
-        msg!("{}", report);
-    }
+    msg!("{}", report);
 
     let mut out = stdout();
     let write_result = filemap::write_all_files(&file_map, &mut out, config);