Fix clippy.
This commit is contained in:
parent
e5b345bca4
commit
0b6657d1b1
@ -240,14 +240,12 @@ impl ModuleResolver for FileModuleResolver {
|
|||||||
file_path.set_extension(&self.extension); // Force extension
|
file_path.set_extension(&self.extension); // Force extension
|
||||||
|
|
||||||
// Load the script file and compile it
|
// Load the script file and compile it
|
||||||
let mut ast = engine
|
let mut ast = engine.compile_file(file_path).map_err(|err| match *err {
|
||||||
.compile_file(file_path.clone())
|
EvalAltResult::ErrorSystem(_, err) if err.is::<IoError>() => {
|
||||||
.map_err(|err| match *err {
|
Box::new(EvalAltResult::ErrorModuleNotFound(path.to_string(), pos))
|
||||||
EvalAltResult::ErrorSystem(_, err) if err.is::<IoError>() => {
|
}
|
||||||
Box::new(EvalAltResult::ErrorModuleNotFound(path.to_string(), pos))
|
_ => Box::new(EvalAltResult::ErrorInModule(path.to_string(), err, pos)),
|
||||||
}
|
})?;
|
||||||
_ => Box::new(EvalAltResult::ErrorInModule(path.to_string(), err, pos)),
|
|
||||||
})?;
|
|
||||||
|
|
||||||
ast.set_source(path);
|
ast.set_source(path);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user