diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-04-20 13:06:57 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-04-20 18:43:42 +0200 |
commit | 468302d54bc42fac510f9dce0cbd46f609b84ed7 (patch) | |
tree | 9f2ab79c1220dec0a427dee81776ef392f3101aa | |
parent | 7cd6364f93e61455d14ddea2313b50b953e2d017 (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.rs | 6 |
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 { |