From 2f4ef7dd1e78d6d73d5d983ccc97d2fee68b4b7f Mon Sep 17 00:00:00 2001 From: Alex Newman Date: Tue, 18 Aug 2015 11:04:58 -0700 Subject: Provide information about default.toml --- src/bin/rustfmt.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit 1.4.1-3-g733a5