diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-19 14:15:21 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-20 18:04:56 +0100 |
commit | 046cbc7837cfae8505cb77cdc0352eeaac023a85 (patch) | |
tree | acd00a0e9043b83648a749a32602b870e2bacbf4 /guide | |
parent | 103379888e9d0ccc701a24f2adb539bc9095f10b (diff) |
openpgp: Move fields from Common to Container.
Diffstat (limited to 'guide')
-rw-r--r-- | guide/src/chapter_03.md | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/guide/src/chapter_03.md b/guide/src/chapter_03.md index b46fc5d7..d7f8b4b9 100644 --- a/guide/src/chapter_03.md +++ b/guide/src/chapter_03.md @@ -87,8 +87,7 @@ const MESSAGE: &str = fn main() { let message = openpgp::Message::from_bytes(MESSAGE.as_bytes()).unwrap(); - assert_eq!(message.body().and_then(|literal| literal.body()), - Some("صداقة".as_bytes())); + assert_eq!(message.body().unwrap().body(), "صداقة".as_bytes()); } ``` @@ -137,7 +136,7 @@ fn main() { // The second packet is the literal data packet. if let openpgp::Packet::Literal(ref literal) = packets[1] { - assert_eq!(literal.body(), Some("صداقة".as_bytes())); + assert_eq!(literal.body(), "صداقة".as_bytes()); } else { panic!("expected literal data packet"); } |