diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-02-06 12:30:27 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-02-06 12:30:27 +0100 |
commit | d6f553a2f3063d2995fbd91ed137cc876d7ecdc0 (patch) | |
tree | d191406c8d326ff15ae933b7985239c08fca3692 /src | |
parent | 35b03999024955f68008d9ef5287cff753ed178b (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 'src')
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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)?; |