refactor: Make Fingerprint not implement Display (#8177)

Currently, the Fingerprint type implements Display, but this doesn't get
you the canonical fingerprint representation, but something
human-readable. This is confusing, and back when I first used
`Fingerprint`, I immediately wrote a bug because of this. So, instead,
make a function `human_readable()` on Fingerprint.

This comes from the discussion at
https://github.com/chatmail/core/pull/8174#discussion_r3143130722.
This commit is contained in:
Hocuri
2026-04-27 11:22:21 +02:00
committed by GitHub
parent 0580056b62
commit b806efa096
7 changed files with 34 additions and 33 deletions

View File

@@ -388,7 +388,7 @@ async fn test_decode_openpgp_fingerprint() -> Result<()> {
bob,
&format!(
"OPENPGP4FPR:{}#a=alice@example.org",
alice_contact.fingerprint().unwrap()
alice_contact.fingerprint().unwrap().hex()
),
)
.await?;