From acdbb1ecd1ccfdb44ddc6134bd37b44a42226ec0 Mon Sep 17 00:00:00 2001 From: Jasper den Hertog Date: Thu, 29 Feb 2024 09:28:14 +0100 Subject: [PATCH] Display impl for Origin --- src/bgp/types.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bgp/types.rs b/src/bgp/types.rs index 427a6820..33830b8f 100644 --- a/src/bgp/types.rs +++ b/src/bgp/types.rs @@ -283,6 +283,12 @@ impl From for Origin { } } +impl std::fmt::Display for Origin { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) + } +} + /// Wrapper for the 4 byte Multi-Exit Discriminator in path attributes. #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]