diff options
| -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; |