catalog: derive PartEq for equality checks of two DirEntry's.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2020-02-27 17:12:55 +01:00 committed by Dietmar Maurer
parent 536683e73b
commit 11ee5c0563

View File

@ -56,14 +56,14 @@ impl fmt::Display for CatalogEntryType {
///
/// The ``attr`` property contain the exact type with type specific
/// attributes.
#[derive(Clone)]
#[derive(Clone, PartialEq)]
pub struct DirEntry {
pub name: Vec<u8>,
pub attr: DirEntryAttribute,
}
/// Used to specific additional attributes inside DirEntry
#[derive(Clone)]
#[derive(Clone, PartialEq)]
pub enum DirEntryAttribute {
Directory { start: u64 },
File { size: u64, mtime: u64 },