diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-01-20 08:09:40 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-01-20 08:09:40 +0100 |
commit | 68071282328a3c2db79b66a27e8b42e5d76b2c08 (patch) | |
tree | f055f559c17f2b1ced88dcc4aac260d4eb5e4f8c | |
parent | c404360b8492bad19739be76340a9a28e59d52cf (diff) |
openpgp: Don't implement From<KeyHandle> for String explicitly.
- `From<T> for String` is implemented implicitly if `Display` is
implemented, which is the case for KeyHandle.
-rw-r--r-- | openpgp/src/keyhandle.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/openpgp/src/keyhandle.rs b/openpgp/src/keyhandle.rs index e4fb3323..c5058b9d 100644 --- a/openpgp/src/keyhandle.rs +++ b/openpgp/src/keyhandle.rs @@ -94,15 +94,6 @@ impl TryFrom<&KeyHandle> for Fingerprint { } } -impl From<KeyHandle> for String { - fn from(i: KeyHandle) -> Self { - match i { - KeyHandle::Fingerprint(i) => i.to_string(), - KeyHandle::KeyID(i) => i.to_string(), - } - } -} - impl PartialOrd for KeyHandle { fn partial_cmp(&self, other: &KeyHandle) -> Option<Ordering> { let a = self.as_slice(); |