Don't panic if we have tidy errors.

Otherwise we get the standard Rust panic message alongside "some tidy
checks failed" which seems unnecessary.
This commit is contained in:
Corey Farwell 2017-03-19 11:22:48 -04:00
parent 5e122f59ba
commit bd698b9e8b

View file

@ -16,9 +16,11 @@
extern crate regex;
use std::fs;
use std::path::{PathBuf, Path};
use std::env;
use std::fs;
use std::io::{self, Write};
use std::path::{PathBuf, Path};
use std::process;
macro_rules! t {
($e:expr, $p:expr) => (match $e {
@ -60,7 +62,8 @@ fn main() {
}
if bad {
panic!("some tidy checks failed");
writeln!(io::stderr(), "some tidy checks failed").expect("could not write to stderr");
process::exit(1);
}
}