mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 18:24:10 +02:00
types 0.1.2
This commit is contained in:
parent
fd5fa1b1f0
commit
c7adeef08e
3 changed files with 18 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use std::fmt::Display;
|
||||
use std::str::FromStr;
|
||||
pub use steamid_ng::SteamID;
|
||||
use time::{Date, OffsetDateTime};
|
||||
|
|
@ -297,6 +298,21 @@ impl GameMode {
|
|||
GameMode::Ultiduo => '2',
|
||||
}
|
||||
}
|
||||
|
||||
fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
GameMode::Highlander => "9v9",
|
||||
GameMode::Sixes => "6v6",
|
||||
GameMode::Fours => "4v4",
|
||||
GameMode::Ultiduo => "2v2",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for GameMode {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_str(self.as_str())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue