Main - expect(&format!()) is bad, according to clippy
This commit is contained in:
parent
0872f58baf
commit
ffb1994a59
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,8 @@ fn run_prompt() {
|
|||
|
||||
/// Load a file and run the script it contains.
|
||||
fn run_file(file: &str) -> ErrorHandler {
|
||||
let contents = fs::read_to_string(file).expect(&format!("Could not load {}", file));
|
||||
let contents = fs::read_to_string(file)
|
||||
.unwrap_or_else(|_| panic!("Could not load {}", file));
|
||||
run(contents)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue