speedrun_api/types/
region_impls.rs

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