Otherwise we get the standard Rust panic message alongside "some tidy
checks failed" which seems unnecessary.
extern crate regex;
+use std::env;
use std::fs;
+use std::io::{self, Write};
use std::path::{PathBuf, Path};
-use std::env;
+use std::process;
macro_rules! t {
($e:expr, $p:expr) => (match $e {
}
if bad {
- panic!("some tidy checks failed");
+ writeln!(io::stderr(), "some tidy checks failed").expect("could not write to stderr");
+ process::exit(1);
}
}