Rollup merge of #60041 - jnferner:patch-1, r=shepmaster
Simplify the returning of a Result a bit
This commit is contained in:
commit
2171250ca4
1 changed files with 1 additions and 2 deletions
|
|
@ -901,8 +901,7 @@ impl OpenOptions {
|
|||
}
|
||||
|
||||
fn _open(&self, path: &Path) -> io::Result<File> {
|
||||
let inner = fs_imp::File::open(path, &self.0)?;
|
||||
Ok(File { inner })
|
||||
fs_imp::File::open(path, &self.0).map(|inner| File { inner })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue