summaryrefslogtreecommitdiffstats
path: root/guide/src
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-02-06 12:30:27 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-02-06 12:30:27 +0100
commitd6f553a2f3063d2995fbd91ed137cc876d7ecdc0 (patch)
treed191406c8d326ff15ae933b7985239c08fca3692 /guide/src
parent35b03999024955f68008d9ef5287cff753ed178b (diff)
openpgp: Remove the armored! macro.
- The packet parser now digests armored data, so there is no need to use this even in examples or tests, just use the appropriate .from_bytes(..) function. - Fixes #169.
Diffstat (limited to 'guide/src')
-rw-r--r--guide/src/chapter_00.md8
1 files changed, 3 insertions, 5 deletions
diff --git a/guide/src/chapter_00.md b/guide/src/chapter_00.md
index 3d440841..10570cf4 100644
--- a/guide/src/chapter_00.md
+++ b/guide/src/chapter_00.md
@@ -47,18 +47,16 @@ not populated `main` yet. Let's do that! Open `src/main.rs` with
your favorite editor, and enter:
```
-#[macro_use] // For armored!
extern crate sequoia_openpgp as openpgp;
use std::io;
fn main() {
- let mut reader = armored!(
- "-----BEGIN PGP ARMORED FILE-----
+ let mut reader = openpgp::armor::Reader::from_bytes(
+ b"-----BEGIN PGP ARMORED FILE-----
SGVsbG8gd29ybGQhCg==
=XLsG
- -----END PGP ARMORED FILE-----"
- );
+ -----END PGP ARMORED FILE-----", None);
io::copy(&mut reader, &mut io::stdout()).unwrap();
}