summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/unknown.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/packet/unknown.rs')
-rw-r--r--openpgp/src/packet/unknown.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/openpgp/src/packet/unknown.rs b/openpgp/src/packet/unknown.rs
index 0819c375..ca7d40e6 100644
--- a/openpgp/src/packet/unknown.rs
+++ b/openpgp/src/packet/unknown.rs
@@ -52,15 +52,10 @@ impl Unknown {
pub fn set_body(&mut self, data: Vec<u8>) {
self.common.body = Some(data);
}
-
- /// Convert the `Unknown` struct to a `Packet`.
- pub fn to_packet(self) -> Packet {
- Packet::Unknown(self)
- }
}
impl From<Unknown> for Packet {
fn from(s: Unknown) -> Self {
- s.to_packet()
+ Packet::Unknown(s)
}
}