diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-05-13 17:09:31 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-05-13 17:09:31 +0200 |
commit | 16e2c23d76d780457aa4a68e3981d685f3ff80c1 (patch) | |
tree | eb3f8063bc192c2997652445fddb456efabe5ab3 /guide | |
parent | 8bc173039650ee2f8f20de1e75e68a541b9c6b75 (diff) |
openpgp: Convert from ValidKeyAmalgamation for Recipient.
- Simplify examples accordingly.
Diffstat (limited to 'guide')
-rw-r--r-- | guide/src/chapter_02.md | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/guide/src/chapter_02.md b/guide/src/chapter_02.md index e3da3d80..64ba07cb 100644 --- a/guide/src/chapter_02.md +++ b/guide/src/chapter_02.md @@ -57,8 +57,7 @@ fn main() { # -> openpgp::Result<()> { # let recipients = # recipient.keys().with_policy(policy, None).alive().revoked(false) -# .for_transport_encryption() -# .map(|ka| ka.key()); +# .for_transport_encryption(); # # // Start streaming an OpenPGP message. # let message = Message::new(sink); @@ -203,8 +202,7 @@ fn generate() -> openpgp::Result<openpgp::Cert> { # -> openpgp::Result<()> { # let recipients = # recipient.keys().with_policy(policy, None).alive().revoked(false) -# .for_transport_encryption() -# .map(|ka| ka.key()); +# .for_transport_encryption(); # # // Start streaming an OpenPGP message. # let message = Message::new(sink); @@ -349,8 +347,7 @@ fn encrypt(policy: &dyn Policy, -> openpgp::Result<()> { let recipients = recipient.keys().with_policy(policy, None).alive().revoked(false) - .for_transport_encryption() - .map(|ka| ka.key()); + .for_transport_encryption(); // Start streaming an OpenPGP message. let message = Message::new(sink); @@ -509,8 +506,7 @@ Decrypted data can be read from this using [`io::Read`]. # -> openpgp::Result<()> { # let recipients = # recipient.keys().with_policy(policy, None).alive().revoked(false) -# .for_transport_encryption() -# .map(|ka| ka.key()); +# .for_transport_encryption(); # # // Start streaming an OpenPGP message. # let message = Message::new(sink); |