summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-04-20 13:06:57 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-04-20 18:43:42 +0200
commit468302d54bc42fac510f9dce0cbd46f609b84ed7 (patch)
tree9f2ab79c1220dec0a427dee81776ef392f3101aa
parent7cd6364f93e61455d14ddea2313b50b953e2d017 (diff)
openpgp: Don't finalize the armor::Writer in Drop.
- Previously, armor::Writer::drop made an effort to finalize the filter. This, however, is only a best-effort mechanism: It cannot report errors. - Because of this, we now believe that it actually exacerbates the problem of downstream users not finalizing the filter: It will work most of the time, but sometimes fail.
-rw-r--r--openpgp/src/armor.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs
index f4c996f8..6433dae5 100644
--- a/openpgp/src/armor.rs
+++ b/openpgp/src/armor.rs
@@ -370,12 +370,6 @@ impl<W: Write> Write for Writer<W> {
}
}
-impl<W: Write> Drop for Writer<W> {
- fn drop(&mut self) {
- let _ = self.finalize_armor();
- }
-}
-
/// How an ArmorReader should act.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum ReaderMode {