Skip to content

Commit

Permalink
Fix Game From impls on no-model compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyla Hellyer committed Aug 5, 2018
1 parent 0d55363 commit a4c3fec
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/model/gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,21 @@ impl Game {

impl<'a> From<&'a str> for Game {
fn from(name: &'a str) -> Self {
Game::playing(name)
Game {
kind: GameType::Playing,
name: name.to_owned(),
url: None,
}
}
}

impl From<String> for Game {
fn from(name: String) -> Self {
Game::playing(&name)
Game {
kind: GameType::Playing,
url: None,
name,
}
}
}

Expand Down

0 comments on commit a4c3fec

Please sign in to comment.