summaryrefslogtreecommitdiffstats
path: root/guide
diff options
context:
space:
mode:
Diffstat (limited to 'guide')
-rw-r--r--guide/src/chapter_03.md5
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");
}