Remove scope for better readability
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
0e4cb59772
commit
d493b04555
1 changed files with 3 additions and 5 deletions
|
@ -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() {
|
||||
::std::io::ErrorKind::NotFound => return Ok(None),
|
||||
_ => return Err(e),
|
||||
}
|
||||
Err(e) => match e.kind() {
|
||||
::std::io::ErrorKind::NotFound => return Ok(None),
|
||||
_ => return Err(e),
|
||||
},
|
||||
Ok(file) => Ok(Some(file))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue