diff --git a/Cargo.lock b/Cargo.lock index 7f06f46..fe3e48c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,7 +2,7 @@ name = "wsbroad" version = "0.1.0" dependencies = [ - "compactmap 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "compactmap 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "futures-await 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -58,7 +58,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "compactmap" -version = "0.2.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -454,7 +454,7 @@ dependencies = [ "checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" "checksum bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d828f97b58cc5de3e40c421d0cf2132d6b2da4ee0e11b8632fa838f0f9333ad6" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum compactmap 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f90307247cb8e2dfab57e5142cb9c9044755880d3b23d121af2ffe59f3c8f9d3" +"checksum compactmap 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c1f714f36264974549514b55231870acc02af551540966d674e5419b053ed92c" "checksum fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0581a4e363262e52b87f59ee2afe3415361c6ec35e665924eb08afe8ff159" "checksum fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "43f3795b4bae048dc6123a6b972cadde2e676f9ded08aef6bb77f5f157684a82" "checksum futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "118b49cac82e04121117cbd3121ede3147e885627d82c4546b87c702debb90c1" diff --git a/Cargo.toml b/Cargo.toml index f49231f..afac343 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,4 +10,4 @@ tokio-core = "0.1" tokio-io = "0.1" websocket = { version = "0.20", default-features = false, features = ["async"]} #take_mut = "0.2" -compactmap = "^0.2.1" +compactmap = "0.3" diff --git a/src/main.rs b/src/main.rs index 8f0fe2b..8fbb1e6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,7 +73,7 @@ fn serve_client(handle: Handle, client: UsualClient, all:AllClients) -> Result<( } } - if let Some(snd) = all.borrow_mut().take(my_id) { + if let Some(snd) = all.borrow_mut().remove(my_id) { if let Ok(snd) = Rc::try_unwrap(snd) { let _ = snd.into_inner().send(OwnedMessage::Close(None)).poll(); }