summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-03-28 13:32:03 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-03-28 13:32:03 +0100
commitb19d332f36db71177c8dfbe7821d4cc03586173a (patch)
treed2b23cbc82de797ce02f4074b226f2630634e069
parent2a652c6d5aef988069546a19ba5ec0c6acb03962 (diff)
openpgp: Fix PacketParser::drop_eof to use O(1) memory.
- The default implementation of drop_eof uses O(1) memory; the specialized version uses O(n). - Prefer the default implementation.
-rw-r--r--openpgp/src/parse.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index 3be0e8a4..8403fe86 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -3950,10 +3950,6 @@ impl<'a> BufferedReader<Cookie> for PacketParser<'a> {
Ok(v)
}
- fn drop_eof(&mut self) -> io::Result<bool> {
- Ok(! self.steal_eof()?.is_empty())
- }
-
fn get_mut(&mut self) -> Option<&mut dyn BufferedReader<Cookie>> {
None
}