From e3ca4982c5cbbb03fb98f1e7f6f2ebf2f80d0559 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 11 Feb 2024 23:01:18 +0000 Subject: [PATCH] Implement Display for Name --- src/rr.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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 { -- 2.39.5