Remove indirection
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
d493b04555
commit
1a70c523dc
1 changed files with 1 additions and 3 deletions
|
@ -201,9 +201,7 @@ fn create_file<A: AsRef<Path>>(p: A) -> ::std::io::Result<File> {
|
|||
trace!("'{}' is directory = {}", parent.display(), parent.is_dir());
|
||||
if !parent.is_dir() {
|
||||
trace!("Implicitely creating directory: {:?}", parent);
|
||||
if let Err(e) = create_dir_all(parent) {
|
||||
return Err(e);
|
||||
}
|
||||
let _ = create_dir_all(parent)?;
|
||||
}
|
||||
}
|
||||
OpenOptions::new().write(true).read(true).create(true).open(p)
|
||||
|
|
Loading…
Reference in a new issue