From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 975868BD37 for ; Thu, 27 Oct 2022 15:38:43 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7A8B337FAE for ; Thu, 27 Oct 2022 15:38:13 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 27 Oct 2022 15:38:12 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DBD1744C2C for ; Thu, 27 Oct 2022 15:38:11 +0200 (CEST) Date: Thu, 27 Oct 2022 15:38:10 +0200 From: Wolfgang Bumiller To: Lukas Wagner Cc: pbs-devel@lists.proxmox.com Message-ID: <20221027133810.4kxotqejevagdxng@casey.proxmox.com> References: <20221027122806.79851-1-l.wagner@proxmox.com> <20221027122806.79851-2-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221027122806.79851-2-l.wagner@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.244 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [lib.rs, acl.rs, mod.rs] Subject: [pbs-devel] applied: [PATCH pxar 1/1] derive PartialEq trait for Metadata and related structs X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2022 13:38:43 -0000 applied, thanks On Thu, Oct 27, 2022 at 02:28:05PM +0200, Lukas Wagner wrote: > This change is needed in order to compare a file's metadata > in the coming proxmox-backup-debug diff tool. > > Signed-off-by: Lukas Wagner > --- > src/format/acl.rs | 4 ++-- > src/format/mod.rs | 8 ++++---- > src/lib.rs | 8 ++++---- > 3 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/src/format/acl.rs b/src/format/acl.rs > index 510e0bc..640f7e6 100644 > --- a/src/format/acl.rs > +++ b/src/format/acl.rs > @@ -96,8 +96,8 @@ pub struct GroupObject { > pub permissions: Permissions, > } > > -#[derive(Clone, Debug, Endian)] > -#[cfg_attr(feature = "test-harness", derive(Eq, PartialEq))] > +#[derive(Clone, Debug, Endian, PartialEq)] > +#[cfg_attr(feature = "test-harness", derive(Eq))] > #[repr(C)] > pub struct Default { > pub user_obj_permissions: Permissions, > diff --git a/src/format/mod.rs b/src/format/mod.rs > index 3224a49..742e126 100644 > --- a/src/format/mod.rs > +++ b/src/format/mod.rs > @@ -371,8 +371,8 @@ impl From for Stat { > } > } > > -#[derive(Clone, Debug, Default, Endian)] > -#[cfg_attr(feature = "test-harness", derive(Eq, PartialEq))] > +#[derive(Clone, Debug, Default, Endian, PartialEq)] > +#[cfg_attr(feature = "test-harness", derive(Eq))] > #[repr(C)] > pub struct Stat { > pub mode: u64, > @@ -679,8 +679,8 @@ fn test_linux_devices() { > assert_eq!(dev.to_dev_t(), c_dev); > } > > -#[derive(Clone, Debug)] > -#[cfg_attr(feature = "test-harness", derive(Eq, PartialEq))] > +#[derive(Clone, Debug, PartialEq)] > +#[cfg_attr(feature = "test-harness", derive(Eq))] > #[repr(C)] > pub struct FCaps { > pub data: Vec, > diff --git a/src/lib.rs b/src/lib.rs > index c22b8da..03f5df5 100644 > --- a/src/lib.rs > +++ b/src/lib.rs > @@ -29,8 +29,8 @@ pub use format::{mode, Stat}; > /// > /// This includes the usual data you'd get from `stat()` as well as ACLs, extended attributes, file > /// capabilities and more. > -#[derive(Clone, Debug, Default)] > -#[cfg_attr(feature = "test-harness", derive(Eq, PartialEq))] > +#[derive(Clone, Debug, Default, PartialEq)] > +#[cfg_attr(feature = "test-harness", derive(Eq))] > pub struct Metadata { > /// Data typically found in a `stat()` call. > pub stat: Stat, > @@ -305,8 +305,8 @@ impl MetadataBuilder { > /// ACL entries of a pxar archive. > /// > /// This contains all the various ACL entry types supported by the pxar archive format. > -#[derive(Clone, Debug, Default)] > -#[cfg_attr(feature = "test-harness", derive(Eq, PartialEq))] > +#[derive(Clone, Debug, Default, PartialEq)] > +#[cfg_attr(feature = "test-harness", derive(Eq))] > pub struct Acl { > /// User ACL list. > pub users: Vec, > -- > 2.30.2