diff options
| author | acdenisSK <[email protected]> | 2016-12-07 19:10:21 +0100 |
|---|---|---|
| committer | zeyla <[email protected]> | 2016-12-07 10:10:21 -0800 |
| commit | f69512beaa157775accd4392295dba112adcf1df (patch) | |
| tree | 0944aeabdec8609393f78b9ec257dc5d09d4f6c0 /src/client/mod.rs | |
| parent | Allow mentionable structs to be used as command arguments (diff) | |
| download | serenity-f69512beaa157775accd4392295dba112adcf1df.tar.xz serenity-f69512beaa157775accd4392295dba112adcf1df.zip | |
Change all try's into ?s
This breaks compatibility with < 1.13, but we didn't support that anyway.
Diffstat (limited to 'src/client/mod.rs')
| -rw-r--r-- | src/client/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index cf67b5b..843bbfe 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -279,7 +279,7 @@ impl Client { /// /// [gateway docs]: gateway/index.html#sharding pub fn start_autosharded(&mut self) -> Result<()> { - let res = try!(rest::get_bot_gateway()); + let res = rest::get_bot_gateway()?; self.start_connection(Some([0, res.shards as u8 - 1, res.shards as u8])) } @@ -768,7 +768,7 @@ impl Client { // // Not all shards need to be initialized in this process. fn start_connection(&mut self, shard_data: Option<[u8; 3]>) -> Result<()> { - let gateway_url = try!(rest::get_gateway()).url; + let gateway_url = rest::get_gateway()?.url; for i in 0..shard_data.map_or(1, |x| x[1] + 1) { let shard = Shard::new(&gateway_url, |