5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2024-12-22 21:33:50 +03:00

derive PartialEq trait for Metadata and related structs

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 <l.wagner@proxmox.com>
This commit is contained in:
Lukas Wagner 2022-10-27 14:28:05 +02:00 committed by Wolfgang Bumiller
parent a6e6873f70
commit 6ec9e99994
3 changed files with 10 additions and 10 deletions

View File

@ -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,

View File

@ -371,8 +371,8 @@ impl From<Stat_V1> 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<u8>,

View File

@ -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<format::acl::User>,