summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/aed.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-01-07 11:52:40 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-01-07 11:54:42 +0100
commit3c0fd337f2bf8f42d3bef163f2714e2f0957efa8 (patch)
tree985e92c681d0a43fcea5d0228628181e8f4967ed /openpgp/src/packet/aed.rs
parent29ffe45d89290b7685cb50d15e40b5a30658ec13 (diff)
openpgp: Do not Deref to Common for the container types.
- This was only implemented for the container types because previously, the container logic was implemented in Common. That is no longer the case and explicit forwarders for the Container type are added.
Diffstat (limited to 'openpgp/src/packet/aed.rs')
-rw-r--r--openpgp/src/packet/aed.rs20
1 files changed, 1 insertions, 19 deletions
diff --git a/openpgp/src/packet/aed.rs b/openpgp/src/packet/aed.rs
index 1dfe579b..dffd654c 100644
--- a/openpgp/src/packet/aed.rs
+++ b/openpgp/src/packet/aed.rs
@@ -1,12 +1,10 @@
//! AEAD encrypted data packets.
-use std::ops::{Deref, DerefMut};
-
use crate::types::{
AEADAlgorithm,
SymmetricAlgorithm,
};
-use crate::packet::{self, Common};
+use crate::packet;
use crate::Packet;
use crate::Error;
use crate::Result;
@@ -136,22 +134,6 @@ impl From<AED1> for super::AED {
}
}
-// Allow transparent access of common fields.
-impl<'a> Deref for AED1 {
- type Target = Common;
-
- fn deref(&self) -> &Self::Target {
- &self.common
- }
-}
-
-// Allow transparent access of common fields.
-impl<'a> DerefMut for AED1 {
- fn deref_mut(&mut self) -> &mut Self::Target {
- &mut self.common
- }
-}
-
#[cfg(test)]
mod tests {
use super::*;