From 3f24517793c59a61dbbb1513124eb177201c15ba Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sun, 8 Dec 2019 12:23:28 +0100 Subject: add console output for build templates --- src/bt.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/bt.rs') diff --git a/src/bt.rs b/src/bt.rs index f3e2090..293e3d4 100644 --- a/src/bt.rs +++ b/src/bt.rs @@ -86,6 +86,18 @@ impl FromStr for TraitChoice { } } +impl fmt::Display for TraitChoice { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let result = match *self { + TraitChoice::None => "none", + TraitChoice::Top => "top", + TraitChoice::Middle => "mid", + TraitChoice::Bottom => "bot", + }; + write!(f, "{}", result) + } +} + /// Represents a revenenant legend. #[repr(u8)] #[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)] -- cgit v1.2.3