diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/rustfmt.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/rustfmt.rs b/src/bin/rustfmt.rs index 3ee7d888af0..a7f65b0bee0 100644 --- a/src/bin/rustfmt.rs +++ b/src/bin/rustfmt.rs @@ -19,7 +19,9 @@ use std::io::Read; fn main() { let args: Vec<_> = std::env::args().collect(); - let mut def_config_file = File::open("default.toml").unwrap(); + let mut def_config_file = File::open("default.toml").unwrap_or_else(|e| { + panic!("Unable to open configuration file [default.toml] {}",e) + }); let mut def_config = String::new(); def_config_file.read_to_string(&mut def_config).unwrap(); |
