maintain original behaviour for single file
@@ -65,7 +65,7 @@ fn main() {
options.no_text_limit(no_text_limit)
.width(width)
.color_mode(color);
-
+ let fail_first = filenames.len() == 1 || fail_first;
let mut errors: i32 = 0;
for filename in &filenames {
@@ -76,7 +76,7 @@ fn main() {
if fail_first {
std::process::exit(ERROR_READ);
}
- errors = errors + 1;
+ errors += 1;
},
Ok(obj) => {
if let Err(ref e) = options.dump_file(&obj) {
@@ -88,7 +88,7 @@ fn main() {
std::process::exit(ERROR_PRINT);
}
}
- errors = errors + 1;
+ errors += 1;
} // else all good
}
};
