summaryrefslogtreecommitdiffstats
path: root/guide/src/chapter_01.md
diff options
context:
space:
mode:
Diffstat (limited to 'guide/src/chapter_01.md')
-rw-r--r--guide/src/chapter_01.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/guide/src/chapter_01.md b/guide/src/chapter_01.md
index 629515eb..178e8e83 100644
--- a/guide/src/chapter_01.md
+++ b/guide/src/chapter_01.md
@@ -57,7 +57,7 @@ fn main() {
# -> openpgp::Result<()>
# {
# // Get the keypair to do the signing from the Cert.
-# let keypair = tsk.keys().set_policy(policy, None)
+# let keypair = tsk.keys().with_policy(policy, None)
# .alive().revoked(false).for_signing().nth(0).unwrap()
# .key().clone().mark_parts_secret().unwrap().into_keypair()?;
#
@@ -211,7 +211,7 @@ fn generate() -> openpgp::Result<openpgp::Cert> {
# -> openpgp::Result<()>
# {
# // Get the keypair to do the signing from the Cert.
-# let keypair = tsk.keys().set_policy(policy, None)
+# let keypair = tsk.keys().with_policy(policy, None)
# .alive().revoked(false).for_signing().nth(0).unwrap()
# .key().clone().mark_parts_secret().unwrap().into_keypair()?;
#
@@ -365,7 +365,7 @@ fn sign(policy: &dyn Policy,
-> openpgp::Result<()>
{
// Get the keypair to do the signing from the Cert.
- let keypair = tsk.keys().set_policy(policy, None)
+ let keypair = tsk.keys().with_policy(policy, None)
.alive().revoked(false).for_signing().nth(0).unwrap()
.key().clone().mark_parts_secret().unwrap().into_keypair()?;
@@ -530,7 +530,7 @@ Verified data can be read from this using [`io::Read`].
# -> openpgp::Result<()>
# {
# // Get the keypair to do the signing from the Cert.
-# let keypair = tsk.keys().set_policy(policy, None)
+# let keypair = tsk.keys().with_policy(policy, None)
# .alive().revoked(false).for_signing().nth(0).unwrap()
# .key().clone().mark_parts_secret().unwrap().into_keypair()?;
#