Apply more suggestions.
This commit is contained in:
@@ -20,8 +20,7 @@ impl FileAccessInterface for LocalFileAccessInterface {
|
||||
fn read_file(&self, path: &str) -> Result<String, std::io::Error> {
|
||||
let final_path = self
|
||||
.working_directory
|
||||
.as_ref()
|
||||
.map(PathBuf::as_path)
|
||||
.as_deref()
|
||||
.map(|pb| pb.join(path))
|
||||
.unwrap_or_else(|| PathBuf::from(path));
|
||||
Ok(std::fs::read_to_string(final_path)?)
|
||||
|
||||
Reference in New Issue
Block a user