From d6f553a2f3063d2995fbd91ed137cc876d7ecdc0 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 6 Feb 2019 12:30:27 +0100 Subject: 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. --- src/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 148e1f3d..97cddbab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,18 +7,17 @@ //! //! ``` //! use std::io::Read; -//! #[macro_use] extern crate sequoia_openpgp as openpgp; +//! extern crate sequoia_openpgp as openpgp; //! # use std::io::Result; //! # fn main() { f().unwrap(); } //! # fn f() -> Result<()> { //! -//! let mut reader = armored!( -//! "-----BEGIN PGP ARMORED FILE----- +//! let mut reader = openpgp::armor::Reader::from_bytes( +//! b"-----BEGIN PGP ARMORED FILE----- //! //! SGVsbG8gd29ybGQh //! =s4Gu -//! -----END PGP ARMORED FILE-----" -//! ); +//! -----END PGP ARMORED FILE-----", None); //! //! let mut content = String::new(); //! reader.read_to_string(&mut content)?; -- cgit v1.2.3