From 75fb008711f0f80028230018ab37b988175211b4 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Sun, 4 Aug 2019 00:27:41 +0200 Subject: openpgp: Rename SubkeyBinding to KeyBinding. - Also rename the `subkey` method to `key`. --- guide/src/chapter_02.md | 8 ++++---- guide/src/chapter_03.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'guide') diff --git a/guide/src/chapter_02.md b/guide/src/chapter_02.md index 7794436e..b6463033 100644 --- a/guide/src/chapter_02.md +++ b/guide/src/chapter_02.md @@ -119,7 +119,7 @@ fn main() { # { # // The encryption key is the first and only subkey. # let key = self.secret.subkeys().nth(0) -# .map(|binding| binding.subkey().clone()) +# .map(|binding| binding.key().clone()) # .unwrap(); # # // The secret key is not encrypted. @@ -253,7 +253,7 @@ fn generate() -> openpgp::Result { # { # // The encryption key is the first and only subkey. # let key = self.secret.subkeys().nth(0) -# .map(|binding| binding.subkey().clone()) +# .map(|binding| binding.key().clone()) # .unwrap(); # # // The secret key is not encrypted. @@ -387,7 +387,7 @@ fn encrypt(sink: &mut Write, plaintext: &str, recipient: &openpgp::TPK) # { # // The encryption key is the first and only subkey. # let key = self.secret.subkeys().nth(0) -# .map(|binding| binding.subkey().clone()) +# .map(|binding| binding.key().clone()) # .unwrap(); # # // The secret key is not encrypted. @@ -535,7 +535,7 @@ impl<'a> DecryptionHelper for Helper<'a> { { // The encryption key is the first and only subkey. let key = self.secret.subkeys().nth(0) - .map(|binding| binding.subkey().clone()) + .map(|binding| binding.key().clone()) .unwrap(); // The secret key is not encrypted. diff --git a/guide/src/chapter_03.md b/guide/src/chapter_03.md index 80d5cc1c..0d8e9996 100644 --- a/guide/src/chapter_03.md +++ b/guide/src/chapter_03.md @@ -53,9 +53,9 @@ fn main() { // Iterate over subkeys. assert_eq!(tpk.subkeys().count(), 2); - assert_eq!(tpk.subkeys().nth(0).unwrap().subkey().fingerprint().to_string(), + assert_eq!(tpk.subkeys().nth(0).unwrap().key().fingerprint().to_string(), "67A4 8753 A380 A6B3 B7DF 7DC5 E6C6 897A 4CEF 8924"); - assert_eq!(tpk.subkeys().nth(1).unwrap().subkey().fingerprint().to_string(), + assert_eq!(tpk.subkeys().nth(1).unwrap().key().fingerprint().to_string(), "185C DAA1 2723 0423 19E4 7F67 108F 2CAF 9034 356D"); } ``` -- cgit v1.2.3