5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-02-09 09:57:40 +03:00

use short assign-bit-or (clippy fix)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-08-22 13:15:53 +02:00
parent 6512017f8b
commit fe2213c986

View File

@ -403,9 +403,9 @@ impl Extractor {
let parent = self.parent_fd()?;
let mut oflags = OFlag::O_CREAT | OFlag::O_WRONLY | OFlag::O_CLOEXEC;
if overwrite {
oflags = oflags | OFlag::O_TRUNC;
oflags |= OFlag::O_TRUNC;
} else {
oflags = oflags | OFlag::O_EXCL;
oflags |= OFlag::O_EXCL;
}
let mut file = unsafe {
std::fs::File::from_raw_fd(
@ -461,9 +461,9 @@ impl Extractor {
let parent = self.parent_fd()?;
let mut oflags = OFlag::O_CREAT | OFlag::O_WRONLY | OFlag::O_CLOEXEC;
if overwrite {
oflags = oflags | OFlag::O_TRUNC;
oflags |= OFlag::O_TRUNC;
} else {
oflags = oflags | OFlag::O_EXCL;
oflags |= OFlag::O_EXCL;
}
let mut file = tokio::fs::File::from_std(unsafe {
std::fs::File::from_raw_fd(