]> git.proxmox.com Git - proxmox-backup.git/commitdiff
src/backup/catalog.rs: derive Clone for DirEntry and DirEntryAttribute
authorChristian Ebner <c.ebner@proxmox.com>
Thu, 14 Nov 2019 16:42:18 +0000 (17:42 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Nov 2019 06:15:39 +0000 (07:15 +0100)
This is needed in order to explicitly clone the values when needed in the
catalog shell implementation.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
src/backup/catalog.rs

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