tools fs: rust fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-07-22 09:44:17 +02:00
parent 11dccc40b5
commit 3fd900d2b2

View File

@ -211,11 +211,11 @@ pub fn atomic_open_or_create_file<P: AsRef<Path>>(
match nix::fcntl::open(path, oflag, stat::Mode::empty()) {
Ok(fd) => return Ok(unsafe { File::from_raw_fd(fd) }),
Err(err) => {
if err.not_found() {
// fall thrue - try to create the file
} else {
bail!("open {:?} failed - {}", path, err);
}
if err.not_found() {
// fall thrue - try to create the file
} else {
bail!("open {:?} failed - {}", path, err);
}
}
}