diff options
| author | Zeyla Hellyer <[email protected]> | 2017-11-09 07:26:27 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-11-09 07:26:27 -0800 |
| commit | d5a9aa8b1e0a94094ef5bda98a76dd259a6e7a3a (patch) | |
| tree | 50b739cf895a57f3e9d27dab809229c712d80fd5 | |
| parent | Fix Shard::shard_info doctest (diff) | |
| download | serenity-d5a9aa8b1e0a94094ef5bda98a76dd259a6e7a3a.tar.xz serenity-d5a9aa8b1e0a94094ef5bda98a76dd259a6e7a3a.zip | |
Make ShardManager::runners public
`ShardManager::public` has been made public to allow direct user
interaction, but should be used with caution due to the fact this can
internally cause an invalid state when used improperly.
| -rw-r--r-- | src/client/bridge/gateway/shard_manager.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/bridge/gateway/shard_manager.rs b/src/client/bridge/gateway/shard_manager.rs index 2cf45fd..9e23d92 100644 --- a/src/client/bridge/gateway/shard_manager.rs +++ b/src/client/bridge/gateway/shard_manager.rs @@ -93,7 +93,11 @@ use framework::Framework; #[derive(Debug)] pub struct ShardManager { /// The shard runners currently managed. - runners: Arc<Mutex<HashMap<ShardId, ShardRunnerInfo>>>, + /// + /// **Note**: It is highly unrecommended to mutate this yourself unless you + /// need to. Instead prefer to use methods on this struct that are provided + /// where possible. + pub runners: Arc<Mutex<HashMap<ShardId, ShardRunnerInfo>>>, /// The index of the first shard to initialize, 0-indexed. shard_index: u64, /// The number of shards to initialize. |