summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/stream.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/serialize/stream.rs')
-rw-r--r--openpgp/src/serialize/stream.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs
index 53068489..cbfa1117 100644
--- a/openpgp/src/serialize/stream.rs
+++ b/openpgp/src/serialize/stream.rs
@@ -1409,12 +1409,10 @@ impl<'a> Write for Signer<'a> {
// later, we will hash it then. Otherwise, it is
// implicitly omitted when the signer is finalized.
self.hash_stash.extend_from_slice(&data[l..]);
+ } else if self.template.typ() == SignatureType::Text {
+ crate::parse::hash_update_text(&mut self.hash, data);
} else {
- if self.template.typ() == SignatureType::Text {
- crate::parse::hash_update_text(&mut self.hash, data);
- } else {
- self.hash.update(data);
- }
+ self.hash.update(data);
}
self.position += amount as u64;
}