From c2c10b9014549e9c0783fb13dc202dfab6e6fd0a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 30 Dec 2018 23:23:31 +0300 Subject: :arrow_up: crossbeam closes #189 --- crates/ra_lsp_server/tests/heavy_tests/support.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'crates/ra_lsp_server/tests') diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index c14d287ca..82ba12f87 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs @@ -118,7 +118,11 @@ impl Server { } fn send_request_(&self, r: RawRequest) -> Value { let id = r.id; - self.worker.as_ref().unwrap().send(RawMessage::Request(r)); + self.worker + .as_ref() + .unwrap() + .send(RawMessage::Request(r)) + .unwrap(); while let Some(msg) = self.recv() { match msg { RawMessage::Request(req) => panic!("unexpected request: {:?}", req), @@ -167,7 +171,8 @@ impl Server { self.worker .as_ref() .unwrap() - .send(RawMessage::Notification(not)); + .send(RawMessage::Notification(not)) + .unwrap(); } } @@ -185,7 +190,7 @@ impl Drop for Server { fn recv_timeout(receiver: &Receiver) -> Option { let timeout = Duration::from_secs(5); select! { - recv(receiver, msg) => msg, - recv(after(timeout)) => panic!("timed out"), + recv(receiver) -> msg => msg.ok(), + recv(after(timeout)) -> _ => panic!("timed out"), } } -- cgit v1.2.3