aboutsummaryrefslogtreecommitdiff
path: root/src/bt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bt.rs')
-rw-r--r--src/bt.rs12
1 files changed, 12 insertions, 0 deletions
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)]