summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-02-06 14:48:41 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-02-06 14:48:41 +0100
commit2673b5eeb0ef7daaf934d5be80ffc6e2dd815318 (patch)
tree6ef9460d027b70286e537b401d0bd4a8fcc86033
parentb2f1c2b6a0b72113d395ff9465e837416f28df0f (diff)
openpgp: Implement Display for KeyID.
-rw-r--r--openpgp/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs
index e66e9923..406ef3fa 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -992,6 +992,12 @@ pub enum KeyID {
Invalid(Box<[u8]>)
}
+impl fmt::Display for KeyID {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ write!(f, "{}", self.to_string())
+ }
+}
+
impl fmt::Debug for KeyID {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("KeyID")