diff options
| author | Zeyla Hellyer <[email protected]> | 2018-08-07 09:24:07 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-08-07 09:25:06 -0700 |
| commit | 39bb75cc6759ceb972c0caca0b03c7971a445eb8 (patch) | |
| tree | 343d97399ea597804f0cd30016034c4adb8efebe /src/client/bridge | |
| parent | Fix some documentation spacing (diff) | |
| download | serenity-39bb75cc6759ceb972c0caca0b03c7971a445eb8.tar.xz serenity-39bb75cc6759ceb972c0caca0b03c7971a445eb8.zip | |
Fix compilation + tests on certain feature combos
On certain feature combinations, compilation and tests would not function
correctly.
This commit goes through a number of feature combinations and gates some tests
behind the required features and fixes other compilation errors.
Diffstat (limited to 'src/client/bridge')
| -rw-r--r-- | src/client/bridge/gateway/shard_messenger.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/bridge/gateway/shard_messenger.rs b/src/client/bridge/gateway/shard_messenger.rs index 6d625b6..a3b5918 100644 --- a/src/client/bridge/gateway/shard_messenger.rs +++ b/src/client/bridge/gateway/shard_messenger.rs @@ -147,9 +147,19 @@ impl ShardMessenger { /// # /// # let mut shard = Shard::new(mutex.clone(), mutex, [0, 1]).unwrap(); /// # + /// # #[cfg(feature = "model")] /// use serenity::model::gateway::Game; + /// # #[cfg(not(feature = "model"))] + /// use serenity::model::gateway::{Game, GameType}; /// + /// # #[cfg(feature = "model")] /// shard.set_game(Some(Game::playing("Heroes of the Storm"))); + /// # #[cfg(not(feature = "model"))] + /// shard.set_game(Some(Game { + /// kind: GameType::Playing, + /// name: "Heroes of the Storm".to_owned(), + /// url: None, + /// })); /// # Ok(()) /// # } /// # |