[pve-devel] [PATCH v2 proxmox 1/7] sys: fs: remove unnecessary clippy allow directive

Lukas Wagner l.wagner at proxmox.com
Thu Sep 28 13:50:06 CEST 2023


It seems like the mentioned clippy bug has since been fixed.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 proxmox-sys/src/fs/dir.rs | 4 ----
 proxmox-sys/src/fs/mod.rs | 2 --
 2 files changed, 6 deletions(-)

diff --git a/proxmox-sys/src/fs/dir.rs b/proxmox-sys/src/fs/dir.rs
index 6aee316..0b409d7 100644
--- a/proxmox-sys/src/fs/dir.rs
+++ b/proxmox-sys/src/fs/dir.rs
@@ -14,8 +14,6 @@ use crate::fs::{fchown, CreateOptions};
 ///
 /// Errors if the directory already exists.
 pub fn create_dir<P: AsRef<Path>>(path: P, options: CreateOptions) -> Result<(), nix::Error> {
-    // clippy bug?: from_bits_truncate is actually a const fn...
-    #[allow(clippy::or_fun_call)]
     let mode: stat::Mode = options
         .perm
         .unwrap_or(stat::Mode::from_bits_truncate(0o770));
@@ -126,8 +124,6 @@ fn create_path_at_do(
                     final_opts.as_ref()
                 };
 
-                // clippy bug?: from_bits_truncate is actually a const fn...
-                #[allow(clippy::or_fun_call)]
                 let mode = opts
                     .and_then(|o| o.perm)
                     .unwrap_or(stat::Mode::from_bits_truncate(0o755));
diff --git a/proxmox-sys/src/fs/mod.rs b/proxmox-sys/src/fs/mod.rs
index 8fb677c..ae54d78 100644
--- a/proxmox-sys/src/fs/mod.rs
+++ b/proxmox-sys/src/fs/mod.rs
@@ -69,8 +69,6 @@ impl CreateOptions {
     }
 
     pub fn apply_to(&self, file: &mut File, path: &Path) -> Result<(), Error> {
-        // clippy bug?: from_bits_truncate is actually a const fn...
-        #[allow(clippy::or_fun_call)]
         let mode: stat::Mode = self.perm.unwrap_or(stat::Mode::from_bits_truncate(0o644));
 
         if let Err(err) = stat::fchmod(file.as_raw_fd(), mode) {
-- 
2.39.2






More information about the pve-devel mailing list