diff --git a/src/config/acl.rs b/src/config/acl.rs index 4ffb2357..63fd065e 100644 --- a/src/config/acl.rs +++ b/src/config/acl.rs @@ -74,12 +74,14 @@ pub const ROLE_ADMIN: u64 = std::u64::MAX; pub const ROLE_NO_ACCESS: u64 = 0; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Audit can view configuration and status information, but not modify it. pub const ROLE_AUDIT: u64 = 0 | PRIV_SYS_AUDIT | PRIV_DATASTORE_AUDIT; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Datastore.Admin can do anything on the datastore. pub const ROLE_DATASTORE_ADMIN: u64 = 0 | PRIV_DATASTORE_AUDIT @@ -90,6 +92,7 @@ pub const ROLE_DATASTORE_ADMIN: u64 = 0 | PRIV_DATASTORE_PRUNE; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Datastore.Reader can read/verify datastore content and do restore pub const ROLE_DATASTORE_READER: u64 = 0 | PRIV_DATASTORE_AUDIT @@ -97,27 +100,32 @@ pub const ROLE_DATASTORE_READER: u64 = 0 | PRIV_DATASTORE_READ; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Datastore.Backup can do backup and restore, but no prune. pub const ROLE_DATASTORE_BACKUP: u64 = 0 | PRIV_DATASTORE_BACKUP; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Datastore.PowerUser can do backup, restore, and prune. pub const ROLE_DATASTORE_POWERUSER: u64 = 0 | PRIV_DATASTORE_PRUNE | PRIV_DATASTORE_BACKUP; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Datastore.Audit can audit the datastore. pub const ROLE_DATASTORE_AUDIT: u64 = 0 | PRIV_DATASTORE_AUDIT; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Remote.Audit can audit the remote pub const ROLE_REMOTE_AUDIT: u64 = 0 | PRIV_REMOTE_AUDIT; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Remote.Admin can do anything on the remote. pub const ROLE_REMOTE_ADMIN: u64 = 0 | PRIV_REMOTE_AUDIT @@ -125,6 +133,7 @@ pub const ROLE_REMOTE_ADMIN: u64 = 0 | PRIV_REMOTE_READ; #[rustfmt::skip] +#[allow(clippy::identity_op)] /// Remote.SyncOperator can do read and prune on the remote. pub const ROLE_REMOTE_SYNC_OPERATOR: u64 = 0 | PRIV_REMOTE_AUDIT diff --git a/src/tools/logrotate.rs b/src/tools/logrotate.rs index 5d026e8c..a326a3a2 100644 --- a/src/tools/logrotate.rs +++ b/src/tools/logrotate.rs @@ -104,7 +104,7 @@ impl LogRotate { for i in (0..count-1).rev() { if self.compress - && filenames[i+0].extension() != Some(std::ffi::OsStr::new("zst")) + && filenames[i].extension() != Some(std::ffi::OsStr::new("zst")) && filenames[i+1].extension() == Some(std::ffi::OsStr::new("zst")) { Self::compress(&filenames[i], &filenames[i+1], &options)?;