From 7add3c843babb7770d6dac3a2b51abd19d46b932 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Mon, 11 Dec 2017 22:36:54 +0100 Subject: Remove the unused Deref implementations for the OpenPGP packets --- src/openpgp/openpgp.rs | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/openpgp/openpgp.rs b/src/openpgp/openpgp.rs index 999dde4f..d0d7f023 100644 --- a/src/openpgp/openpgp.rs +++ b/src/openpgp/openpgp.rs @@ -236,15 +236,6 @@ impl std::fmt::Debug for Signature { } } -// Allow transparent access of common fields. -impl<'a> Deref for Signature { - type Target = PacketCommon; - - fn deref(&self) -> &Self::Target { - &self.common - } -} - #[derive(PartialEq)] pub struct Key { common: PacketCommon, @@ -269,15 +260,6 @@ impl std::fmt::Debug for Key { } } -// Allow transparent access of common fields. -impl<'a> Deref for Key { - type Target = PacketCommon; - - fn deref(&self) -> &Self::Target { - &self.common - } -} - #[derive(PartialEq)] pub struct UserID { common: PacketCommon, @@ -294,15 +276,6 @@ impl std::fmt::Debug for UserID { } } -// Allow transparent access of common fields. -impl<'a> Deref for UserID { - type Target = PacketCommon; - - fn deref(&self) -> &Self::Target { - &self.common - } -} - #[derive(PartialEq)] pub struct Literal { common: PacketCommon, @@ -348,30 +321,12 @@ impl std::fmt::Debug for Literal { } } -// Allow transparent access of common fields. -impl<'a> Deref for Literal { - type Target = PacketCommon; - - fn deref(&self) -> &Self::Target { - &self.common - } -} - #[derive(PartialEq)] pub struct CompressedData { common: PacketCommon, algo: u8, } -// Allow transparent access of common fields. -impl Deref for CompressedData { - type Target = PacketCommon; - - fn deref(&self) -> &Self::Target { - &self.common - } -} - impl std::fmt::Debug for CompressedData { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.debug_struct("CompressedData") -- cgit v1.2.3