Skip to content

Commit

Permalink
Rollup merge of rust-lang#60041 - jnferner:patch-1, r=shepmaster
Browse files Browse the repository at this point in the history
Simplify the returning of a Result a bit
  • Loading branch information
Centril authored Apr 19, 2019
2 parents ee511f2 + 379c541 commit 2171250
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
}

Expand Down

0 comments on commit 2171250

Please sign in to comment.