aboutsummaryrefslogtreecommitdiff
path: root/src/mail/unique_ident.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail/unique_ident.rs')
-rw-r--r--src/mail/unique_ident.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mail/unique_ident.rs b/src/mail/unique_ident.rs
index 19de6fc..267f66e 100644
--- a/src/mail/unique_ident.rs
+++ b/src/mail/unique_ident.rs
@@ -16,7 +16,7 @@ use crate::time::now_msec;
/// required by Aerogramme.
/// Their main property is to be unique without having to rely
/// on synchronization between IMAP processes.
-#[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash, Debug)]
+#[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub struct UniqueIdent(pub [u8; 24]);
struct IdentGenerator {
@@ -78,6 +78,12 @@ impl std::fmt::Display for UniqueIdent {
}
}
+impl std::fmt::Debug for UniqueIdent {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}", hex::encode(self.0))
+ }
+}
+
impl FromStr for UniqueIdent {
type Err = &'static str;