Browse Source

Get rid of extraneous panic

Getty Ritter 6 years ago
parent
commit
b030e8ba96
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/tools/format.rs

+ 1 - 1
src/tools/format.rs

@@ -106,7 +106,7 @@ fn run() -> Result<(), FormatErr> {
             fs::File::open(path)?.read_to_end(&mut buf)?;
             String::from_utf8(buf)?
         },
-        None => panic!("No template specified!"),
+        None => Err(format!("No template specified!"))?,
     };
 
     let recfile = rrecutils::Recfile::parse(input)?;