Random fixes

This commit is contained in:
Jonathan Turner
2019-09-01 09:19:59 +12:00
parent 70ebe899c6
commit 1a67ac6102
7 changed files with 79 additions and 56 deletions

View File

@ -57,7 +57,7 @@ fn load_plugin(path: &std::path::Path, context: &mut Context) -> Result<(), Shel
let path = dunce::canonicalize(path)?;
let mut input = String::new();
match reader.read_line(&mut input) {
let result = match reader.read_line(&mut input) {
Ok(count) => {
trace!("processing response ({} bytes)", count);
@ -91,7 +91,9 @@ fn load_plugin(path: &std::path::Path, context: &mut Context) -> Result<(), Shel
}
}
Err(e) => Err(ShellError::string(format!("Error: {:?}", e))),
}
};
result
}
fn load_plugins_in_dir(path: &std::path::PathBuf, context: &mut Context) -> Result<(), ShellError> {