summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openpgp/src/parse/hashed_reader.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/openpgp/src/parse/hashed_reader.rs b/openpgp/src/parse/hashed_reader.rs
index e5d93023..1a02f079 100644
--- a/openpgp/src/parse/hashed_reader.rs
+++ b/openpgp/src/parse/hashed_reader.rs
@@ -17,6 +17,7 @@ const TRACE : bool = false;
///
/// OpenPGP normalizes line endings when signing or verifying text
/// signatures.
+#[derive(Clone, Eq)]
pub(crate) enum HashingMode<T> {
/// Hash for a binary signature.
///
@@ -29,16 +30,6 @@ pub(crate) enum HashingMode<T> {
Text(T),
}
-impl<T: Clone> Clone for HashingMode<T> {
- fn clone(&self) -> Self {
- use self::HashingMode::*;
- match self {
- Binary(t) => Binary(t.clone()),
- Text(t) => Text(t.clone()),
- }
- }
-}
-
impl<T: std::fmt::Debug> std::fmt::Debug for HashingMode<T> {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
use self::HashingMode::*;
@@ -60,8 +51,6 @@ impl<T: PartialEq> PartialEq for HashingMode<T> {
}
}
-impl<T: Eq> Eq for HashingMode<T> { }
-
impl<T> HashingMode<T> {
pub(crate) fn map<U, F: Fn(&T) -> U>(&self, f: F) -> HashingMode<U> {
use self::HashingMode::*;