From 796f8fc046c4e60700662c77025c49236b40dad8 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 24 Apr 2019 06:51:54 +0200 Subject: [PATCH] proxmox-protocol/src/protocol.rs: derive Endian for DynamicChunk --- proxmox-protocol/src/protocol.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/proxmox-protocol/src/protocol.rs b/proxmox-protocol/src/protocol.rs index fd28d120..1cd958f2 100644 --- a/proxmox-protocol/src/protocol.rs +++ b/proxmox-protocol/src/protocol.rs @@ -155,6 +155,7 @@ pub mod backup_type { } #[repr(C, packed)] +#[derive(Endian)] pub struct DynamicChunk { pub offset: u64, pub digest: [u8; 32], @@ -229,21 +230,6 @@ pub mod client { } } -impl Endian for DynamicChunk { - fn to_be(self) -> Self { - self - } - fn to_le(self) -> Self { - self - } - fn from_be(self) -> Self { - self - } - fn from_le(self) -> Self { - self - } -} - pub struct PacketBuilder { data: Vec, }