Skip to content

Commit 379c541

Browse files
committed
Simplify the returning of a Result a bit
1 parent efe2f32 commit 379c541

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libstd/fs.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,7 @@ impl OpenOptions {
901901
}
902902

903903
fn _open(&self, path: &Path) -> io::Result<File> {
904-
let inner = fs_imp::File::open(path, &self.0)?;
905-
Ok(File { inner })
904+
fs_imp::File::open(path, &self.0).map(|inner| File { inner })
906905
}
907906
}
908907

0 commit comments

Comments
 (0)