summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-02-12 12:01:11 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-02-12 12:01:11 +0100
commitc204d2e3dd7606a4bf0b68bcd2bb1cafefada88f (patch)
tree75a1c6e19561684a0baabf8b30794b275f06fb03
parent6cf9161c8b3630304f700a5fb3c9c6e9e8d7ba94 (diff)
openpgp: Rename conversion function.
- See #160.
-rw-r--r--openpgp/src/packet/key.rs2
-rw-r--r--openpgp/src/tpk/mod.rs2
-rw-r--r--sqv/tests/revoked-key.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/packet/key.rs b/openpgp/src/packet/key.rs
index bcebb7f7..79f10d66 100644
--- a/openpgp/src/packet/key.rs
+++ b/openpgp/src/packet/key.rs
@@ -438,7 +438,7 @@ impl Key {
}
/// Convert the `Key` struct to a `Packet`.
- pub fn to_packet(self, tag: Tag) -> Result<Packet> {
+ pub fn into_packet(self, tag: Tag) -> Result<Packet> {
match tag {
Tag::PublicKey => Ok(Packet::PublicKey(self)),
Tag::PublicSubkey => Ok(Packet::PublicSubkey(self)),
diff --git a/openpgp/src/tpk/mod.rs b/openpgp/src/tpk/mod.rs
index 7cecb170..15cbf2ab 100644
--- a/openpgp/src/tpk/mod.rs
+++ b/openpgp/src/tpk/mod.rs
@@ -3594,7 +3594,7 @@ mod test {
(bind1, rev, bind2)
};
let tpk = TPK::from_packet_pile(PacketPile::from_packets(vec![
- key.to_packet(Tag::PublicKey).unwrap(),
+ key.into_packet(Tag::PublicKey).unwrap(),
bind1.into(),
bind2.into(),
rev.into()
diff --git a/sqv/tests/revoked-key.rs b/sqv/tests/revoked-key.rs
index ebffafb5..655ba141 100644
--- a/sqv/tests/revoked-key.rs
+++ b/sqv/tests/revoked-key.rs
@@ -155,7 +155,7 @@ mod integration {
// (bind1, rev, bind2, sig1, sig2, sig3)
// };
// let tpk = TPK::from_packet_pile(PacketPile::from_packets(vec![
-// key.to_packet(Tag::PublicKey).unwrap(),
+// key.into_packet(Tag::PublicKey).unwrap(),
// bind1.into(),
// bind2.into(),
// rev.into()