Remove scope for better readability

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-11-06 19:03:10 +01:00
parent 0e4cb59772
commit d493b04555

View file

@ -188,11 +188,9 @@ impl PathIterBuilder for WalkDirPathIterBuilder {
fn open_file<A: AsRef<Path>>(p: A) -> ::std::io::Result<Option<File>> {
match OpenOptions::new().write(true).read(true).open(p) {
Err(e) => {
match e.kind() {
Err(e) => match e.kind() {
::std::io::ErrorKind::NotFound => return Ok(None),
_ => return Err(e),
}
},
Ok(file) => Ok(Some(file))
}