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