mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/team.rs')
| -rw-r--r-- | src/team.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/team.rs b/src/team.rs index cb79d2a..123d996 100644 --- a/src/team.rs +++ b/src/team.rs @@ -1,3 +1,4 @@ +use std::error::Error; use std::fmt; use crate::content::{Content, Type}; @@ -73,6 +74,16 @@ impl fmt::Display for Team } } +impl fmt::Display for TryFromU16Error +{ + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result + { + write!(f, "No content of type Team for value {}", self.0) + } +} + +impl Error for TryFromU16Error {} + const TEAM_NAMES: &str = include_str!("../res/team_names.txt"); impl Content for Team |