From: Matt Corallo Date: Sun, 11 Feb 2024 23:01:18 +0000 (+0000) Subject: Implement Display for Name X-Git-Tag: v0.5.4~63 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=e3ca4982c5cbbb03fb98f1e7f6f2ebf2f80d0559;p=dnssec-prover Implement Display for Name --- diff --git a/src/rr.rs b/src/rr.rs index c585555..981d2b8 100644 --- a/src/rr.rs +++ b/src/rr.rs @@ -9,6 +9,7 @@ use alloc::borrow::ToOwned; use alloc::format; use core::cmp::{self, Ordering}; +use core::fmt; use core::fmt::Write; use crate::ser::*; @@ -27,6 +28,11 @@ impl core::ops::Deref for Name { type Target = str; fn deref(&self) -> &str { &self.0 } } +impl fmt::Display for Name { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + self.0.fmt(f) + } +} impl TryFrom for Name { type Error = (); fn try_from(s: String) -> Result {