diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-03-01 11:12:18 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-03-01 11:49:05 +0100 |
commit | d70b710f431cbfaf33cc6a3701b4282209b55780 (patch) | |
tree | bf7c82d6f170eb739940df141a6016d29df096ff /openpgp/src/parse/packet_pile_parser.rs | |
parent | ab7d4ce33bdf44855c7295e870ced2fac17f62e4 (diff) |
buffered-reader: Drop BufferedReader prefix.
- For example, `buffered_reader::BufferedReaderMemory` is now called
`buffered_reader::Memory`. This makes the type names less unwieldy.
- Fixes #206.
Diffstat (limited to 'openpgp/src/parse/packet_pile_parser.rs')
-rw-r--r-- | openpgp/src/parse/packet_pile_parser.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/openpgp/src/parse/packet_pile_parser.rs b/openpgp/src/parse/packet_pile_parser.rs index 064b4174..d531727b 100644 --- a/openpgp/src/parse/packet_pile_parser.rs +++ b/openpgp/src/parse/packet_pile_parser.rs @@ -14,8 +14,7 @@ use parse::{ Parse, Cookie }; -use buffered_reader::{BufferedReader, BufferedReaderGeneric, - BufferedReaderMemory, BufferedReaderFile}; +use buffered_reader::BufferedReader; #[cfg(test)] #[allow(unused_macros)] @@ -108,7 +107,7 @@ impl<'a> Parse<'a, PacketPileParser<'a>> for PacketPileParser<'a> { /// in the `io::Read` object. fn from_reader<R: io::Read + 'a>(reader: R) -> Result<PacketPileParser<'a>> { - let bio = Box::new(BufferedReaderGeneric::with_cookie( + let bio = Box::new(buffered_reader::Generic::with_cookie( reader, None, Cookie::default())); PacketPileParser::from_buffered_reader(bio) } @@ -118,14 +117,14 @@ impl<'a> Parse<'a, PacketPileParser<'a>> for PacketPileParser<'a> { fn from_file<P: AsRef<Path>>(path: P) -> Result<PacketPileParser<'a>> { PacketPileParser::from_buffered_reader( - Box::new(BufferedReaderFile::with_cookie(path, Cookie::default())?)) + Box::new(buffered_reader::File::with_cookie(path, Cookie::default())?)) } /// Creates a `PacketPileParser` to parse the OpenPGP message stored /// in the provided buffer. fn from_bytes(data: &'a [u8]) -> Result<PacketPileParser<'a>> { - let bio = Box::new(BufferedReaderMemory::with_cookie( + let bio = Box::new(buffered_reader::Memory::with_cookie( data, Cookie::default())); PacketPileParser::from_buffered_reader(bio) } |