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.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs
index 1bc4b507..84a6bfa4 100644
--- a/openpgp/src/serialize/stream.rs
+++ b/openpgp/src/serialize/stream.rs
@@ -1255,7 +1255,7 @@ impl<'a> Signer<'a> {
/// ```
pub fn build(mut self) -> Result<Message<'a>>
{
- assert!(self.signers.len() > 0, "The constructor adds a signer.");
+ assert!(!self.signers.is_empty(), "The constructor adds a signer.");
assert!(self.inner.is_some(), "The constructor adds an inner writer.");
match self.mode {
@@ -1364,7 +1364,7 @@ impl<'a> Write for Signer<'a> {
// Shortcut empty writes. This is important for the code
// below that delays hashing newlines when creating cleartext
// signed messages.
- if buf.len() == 0 {
+ if buf.is_empty() {
return Ok(0);
}