Skip to content

Commit 3663f82

Browse files
committed
Implement core::fmt::Display for HumanReadableName
1 parent 97f0e4b commit 3663f82

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lightning/src/onion_message/dns_resolution.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,12 @@ impl Readable for HumanReadableName {
287287
}
288288
}
289289

290+
impl std::fmt::Display for HumanReadableName {
291+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
292+
write!(f, "₿{}@{}", self.user(), self.domain())
293+
}
294+
}
295+
290296
#[cfg(feature = "dnssec")]
291297
struct PendingResolution {
292298
start_height: u32,

0 commit comments

Comments
 (0)