Remove .lock().unwrap() idiom into locked().
This commit is contained in:
@@ -53,6 +53,7 @@ extern crate jsonrpc_core;
|
||||
extern crate jsonrpc_http_server;
|
||||
extern crate parity_dapps;
|
||||
extern crate ethcore_rpc;
|
||||
extern crate ethcore_util;
|
||||
extern crate mime_guess;
|
||||
|
||||
mod endpoint;
|
||||
@@ -67,6 +68,7 @@ mod proxypac;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::net::SocketAddr;
|
||||
use std::collections::HashMap;
|
||||
use ethcore_util::misc::Lockable;
|
||||
use jsonrpc_core::{IoHandler, IoDelegate};
|
||||
use router::auth::{Authorization, NoAuth, HttpBasicAuth};
|
||||
use ethcore_rpc::Extendable;
|
||||
@@ -149,7 +151,7 @@ impl Server {
|
||||
|
||||
/// Set callback for panics.
|
||||
pub fn set_panic_handler<F>(&self, handler: F) where F : Fn() -> () + Send + 'static {
|
||||
*self.panic_handler.lock().unwrap() = Some(Box::new(handler));
|
||||
*self.panic_handler.locked() = Some(Box::new(handler));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user