summaryrefslogtreecommitdiffstats
path: root/guide/src/chapter_01.md
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-11-26 16:41:58 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-11-27 13:02:12 +0100
commit0eccc8747c26e4676f2d2f8739e89f03357f87e0 (patch)
tree20d89933d51472fd2cc7b63b6c62b3446c585e31 /guide/src/chapter_01.md
parentc64eb5733fa217f10e51f24dd1d6614703f0d828 (diff)
openpgp: Make variants of VerificationResult struct-like, add infos.
Diffstat (limited to 'guide/src/chapter_01.md')
-rw-r--r--guide/src/chapter_01.md32
1 files changed, 16 insertions, 16 deletions
diff --git a/guide/src/chapter_01.md b/guide/src/chapter_01.md
index b2b143bb..889e82f1 100644
--- a/guide/src/chapter_01.md
+++ b/guide/src/chapter_01.md
@@ -118,15 +118,15 @@ fn main() {
# // whether the signature checks out mathematically, we apply
# // our policy.
# match results.get(0) {
-# Some(VerificationResult::GoodChecksum(..)) =>
+# Some(VerificationResult::GoodChecksum { .. }) =>
# good = true,
-# Some(VerificationResult::NotAlive(_)) =>
+# Some(VerificationResult::NotAlive { .. }) =>
# return Err(failure::err_msg(
# "Good, but not alive signature")),
-# Some(VerificationResult::MissingKey(_)) =>
+# Some(VerificationResult::MissingKey { .. }) =>
# return Err(failure::err_msg(
# "Missing key to verify signature")),
-# Some(VerificationResult::BadChecksum(_)) =>
+# Some(VerificationResult::BadChecksum { .. }) =>
# return Err(failure::err_msg("Bad signature")),
# None =>
# return Err(failure::err_msg("No signature")),
@@ -264,15 +264,15 @@ fn generate() -> openpgp::Result<openpgp::TPK> {
# // whether the signature checks out mathematically, we apply
# // our policy.
# match results.get(0) {
-# Some(VerificationResult::GoodChecksum(..)) =>
+# Some(VerificationResult::GoodChecksum { .. }) =>
# good = true,
-# Some(VerificationResult::NotAlive(_)) =>
+# Some(VerificationResult::NotAlive { .. }) =>
# return Err(failure::err_msg(
# "Good, but not alive signature")),
-# Some(VerificationResult::MissingKey(_)) =>
+# Some(VerificationResult::MissingKey { .. }) =>
# return Err(failure::err_msg(
# "Missing key to verify signature")),
-# Some(VerificationResult::BadChecksum(_)) =>
+# Some(VerificationResult::BadChecksum { .. }) =>
# return Err(failure::err_msg("Bad signature")),
# None =>
# return Err(failure::err_msg("No signature")),
@@ -410,15 +410,15 @@ fn sign(sink: &mut Write, plaintext: &str, tsk: &openpgp::TPK)
# // whether the signature checks out mathematically, we apply
# // our policy.
# match results.get(0) {
-# Some(VerificationResult::GoodChecksum(..)) =>
+# Some(VerificationResult::GoodChecksum { .. }) =>
# good = true,
-# Some(VerificationResult::NotAlive(_)) =>
+# Some(VerificationResult::NotAlive { .. }) =>
# return Err(failure::err_msg(
# "Good, but not alive signature")),
-# Some(VerificationResult::MissingKey(_)) =>
+# Some(VerificationResult::MissingKey { .. }) =>
# return Err(failure::err_msg(
# "Missing key to verify signature")),
-# Some(VerificationResult::BadChecksum(_)) =>
+# Some(VerificationResult::BadChecksum { .. }) =>
# return Err(failure::err_msg("Bad signature")),
# None =>
# return Err(failure::err_msg("No signature")),
@@ -567,15 +567,15 @@ impl<'a> VerificationHelper for Helper<'a> {
// whether the signature checks out mathematically, we apply
// our policy.
match results.get(0) {
- Some(VerificationResult::GoodChecksum(..)) =>
+ Some(VerificationResult::GoodChecksum { .. }) =>
good = true,
- Some(VerificationResult::NotAlive(_)) =>
+ Some(VerificationResult::NotAlive { .. }) =>
return Err(failure::err_msg(
"Good, but not alive signature")),
- Some(VerificationResult::MissingKey(_)) =>
+ Some(VerificationResult::MissingKey { .. }) =>
return Err(failure::err_msg(
"Missing key to verify signature")),
- Some(VerificationResult::BadChecksum(_)) =>
+ Some(VerificationResult::BadChecksum { .. }) =>
return Err(failure::err_msg("Bad signature")),
None =>
return Err(failure::err_msg("No signature")),