aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-01-10 20:49:38 -0800
committerZeyla Hellyer <[email protected]>2018-01-10 20:49:38 -0800
commiteb10f7f3c6d48102b833d46ff6668b511fa01a1c (patch)
tree9504a26d171602327fc061d239cda9e6b42e8367 /src
parentRevert "Add `Client::user_id`" (diff)
downloadserenity-eb10f7f3c6d48102b833d46ff6668b511fa01a1c.tar.xz
serenity-eb10f7f3c6d48102b833d46ff6668b511fa01a1c.zip
Fix ShardManager doctest
Diffstat (limited to 'src')
-rw-r--r--src/client/bridge/gateway/shard_manager.rs25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/client/bridge/gateway/shard_manager.rs b/src/client/bridge/gateway/shard_manager.rs
index 1ef981f..c3c091c 100644
--- a/src/client/bridge/gateway/shard_manager.rs
+++ b/src/client/bridge/gateway/shard_manager.rs
@@ -43,7 +43,7 @@ use framework::Framework;
/// # fn try_main() -> Result<(), Box<Error>> {
/// #
/// use parking_lot::Mutex;
-/// use serenity::client::bridge::gateway::ShardManager;
+/// use serenity::client::bridge::gateway::{ShardManager, ShardManagerOptions};
/// use serenity::client::EventHandler;
/// use serenity::http;
/// use std::sync::Arc;
@@ -65,17 +65,20 @@ use framework::Framework;
/// let framework = Arc::new(Mutex::new(None));
/// let threadpool = ThreadPool::with_name("my threadpool".to_owned(), 5);
///
-/// ShardManager::new(
-/// 0, // the shard index to start initiating from
-/// 3, // the number of shards to initiate (this initiates 0, 1, and 2)
-/// 5, // the total number of shards in use
-/// &gateway_url,
-/// &token,
-/// &data,
-/// &event_handler,
-/// &framework,
+/// ShardManager::new(ShardManagerOptions {
+/// data: &data,
+/// event_handler: &event_handler,
+/// framework: &framework,
+/// // the shard index to start initiating from
+/// shard_index: 0,
+/// // the number of shards to initiate (this initiates 0, 1, and 2)
+/// shard_init: 3,
+/// // the total number of shards in use
+/// shard_total: 5,
+/// token: &token,
/// threadpool,
-/// );
+/// ws_url: &gateway_url,
+/// });
/// # Ok(())
/// # }
/// #