aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-08-05 12:18:11 -0700
committerZeyla Hellyer <[email protected]>2018-08-05 12:18:11 -0700
commita4c3fec493d3b85ad1b43f3a5c4927d0d5cdc717 (patch)
treec80739e96f06ea1d54bb79af251bc52bf25d0ffc
parentMake http::fire, http::request public (diff)
downloadserenity-a4c3fec493d3b85ad1b43f3a5c4927d0d5cdc717.tar.xz
serenity-a4c3fec493d3b85ad1b43f3a5c4927d0d5cdc717.zip
Fix Game From impls on no-model compilation
-rw-r--r--src/model/gateway.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/model/gateway.rs b/src/model/gateway.rs
index 9af4a7e..989cff8 100644
--- a/src/model/gateway.rs
+++ b/src/model/gateway.rs
@@ -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,
+ }
}
}