From b2b00e9dbe7eae34ad9533e1a703c02eafabc378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Str=C3=B6m?= Date: Mon, 17 Oct 2016 15:06:45 +0200 Subject: [PATCH] Use Mutex from util --- rpc_client/src/client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpc_client/src/client.rs b/rpc_client/src/client.rs index 04a0e03ae..72036c8c8 100644 --- a/rpc_client/src/client.rs +++ b/rpc_client/src/client.rs @@ -2,14 +2,14 @@ extern crate jsonrpc_core; use std::fmt::{Debug, Formatter, Error as FmtError}; use std::io::{BufReader, BufRead}; -use std::sync::{Arc, Mutex}; +use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; use std::collections::BTreeMap; use std::thread; use std::time; use std::path::PathBuf; -use util::Hashable; +use util::{Hashable, Mutex}; use url::Url; use std::fs::File; @@ -138,10 +138,10 @@ impl Pending { Pending(Arc::new(Mutex::new(BTreeMap::new()))) } fn insert(&mut self, k: usize, v: Complete>) { - self.0.lock().expect("no panics in mutex guard").insert(k, v); + self.0.lock().insert(k, v); } fn remove(&mut self, k: usize) -> Option>> { - self.0.lock().expect("no panics in mutex guard").remove(&k) + self.0.lock().remove(&k) } }