Skip to content

Commit

Permalink
Display impl for Origin
Browse files Browse the repository at this point in the history
  • Loading branch information
density215 committed Feb 29, 2024
1 parent 84c712a commit acdbb1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bgp/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ impl From<OriginType> 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))]
Expand Down

0 comments on commit acdbb1e

Please sign in to comment.