diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-12-03 12:18:15 +0100 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-12-03 15:07:59 +0100 |
commit | 34bf61a959efff8b1876c24bc5e7f058ec45fefe (patch) | |
tree | 406a7159fbcda73fe80bd664925fadf458b7d6fe /openpgp/src/parse.rs | |
parent | 98491a207c6401b158103ae95e9abb85157025cd (diff) |
openpgp: Derive Default.
- Replace manual implementations of Default where the derive(Default)
is identical.
- Suggested by clippy,
https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impl
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r-- | openpgp/src/parse.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs index 36e28eb3..1fe8899d 100644 --- a/openpgp/src/parse.rs +++ b/openpgp/src/parse.rs @@ -728,6 +728,7 @@ assert_send_and_sync!(Cookie); /// Contains hashes for consecutive one pass signature packets ending /// in one with the last flag set. +#[derive(Default)] pub(crate) struct SignatureGroup { /// Counts the number of one pass signature packets this group is /// for. Once this drops to zero, we pop the group from the @@ -833,15 +834,6 @@ impl fmt::Debug for SignatureGroup { } } -impl Default for SignatureGroup { - fn default() -> Self { - SignatureGroup { - ops_count: 0, - hashes: Default::default(), - } - } -} - impl SignatureGroup { /// Clears the signature group. fn clear(&mut self) { |