diff options
| author | Austin Hellyer <[email protected]> | 2016-11-10 09:32:37 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-10 09:32:37 -0800 |
| commit | 853e7ef714b57688c275356f04f4171ff969f92c (patch) | |
| tree | 513162bd1e5abf9da431193f25159a981e61adc8 | |
| parent | Properly shutdown on connection Drop (diff) | |
| download | serenity-853e7ef714b57688c275356f04f4171ff969f92c.tar.xz serenity-853e7ef714b57688c275356f04f4171ff969f92c.zip | |
slice_patterns is not stable
| -rw-r--r-- | src/client/connection.rs | 10 | ||||
| -rw-r--r-- | src/lib.rs | 1 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/client/connection.rs b/src/client/connection.rs index 1ba3341..7586ae3 100644 --- a/src/client/connection.rs +++ b/src/client/connection.rs @@ -460,17 +460,17 @@ impl Drop for Connection { fn drop(&mut self) { match self.shutdown() { Ok(()) => { - if let Some([shard, shards]) = self.shard_info { - println!("Correctly shutdown shard {}/{}", shard, shards - 1); + if let Some(info) = self.shard_info { + println!("Correctly shutdown shard {}/{}", info[0], info[1] - 1); } else { println!("Correctly shutdown connection"); } }, Err(why) => { - if let Some([shard, shards]) = self.shard_info { + if let Some(info) = self.shard_info { println!("Failed to shutdown shard {}/{}: {:?}", - shard, - shards - 1, + info[0], + info[1] - 1, why); } else { println!("Failed to shutdown connection: {:?}", why); @@ -76,7 +76,6 @@ //! [state docs]: ext/state/index.html #![allow(doc_markdown, unknown_lints)] #![allow(dead_code)] -#![feature(slice_patterns)] #[macro_use] extern crate bitflags; |