speedrun_api/types/
game_impls.rs

1use std::fmt::Display;
2
3use crate::api::games::GameId;
4
5use super::Game;
6
7impl<'a> From<Game<'a>> for GameId<'a> {
8    fn from(value: Game<'a>) -> Self {
9        value.id
10    }
11}
12
13impl Display for Game<'_> {
14    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15        write!(f, "{}", &self.names.international)
16    }
17}