aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-10 09:32:37 -0800
committerAustin Hellyer <[email protected]>2016-11-10 09:32:37 -0800
commit853e7ef714b57688c275356f04f4171ff969f92c (patch)
tree513162bd1e5abf9da431193f25159a981e61adc8
parentProperly shutdown on connection Drop (diff)
downloadserenity-853e7ef714b57688c275356f04f4171ff969f92c.tar.xz
serenity-853e7ef714b57688c275356f04f4171ff969f92c.zip
slice_patterns is not stable
-rw-r--r--src/client/connection.rs10
-rw-r--r--src/lib.rs1
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);
diff --git a/src/lib.rs b/src/lib.rs
index 57f12f6..689009c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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;