]> git.proxmox.com Git - proxmox-backup.git/commitdiff
use short assign-bit-or (clippy fix)
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 22 Aug 2022 11:15:53 +0000 (13:15 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 22 Aug 2022 11:15:53 +0000 (13:15 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
pbs-client/src/pxar/extract.rs

index 33f1ebee283ce5a3b13dcff8d0609911bb14a98e..4b688996bda0ebdbb98e87940085f3e79bc9d106 100644 (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(