From 2adeb9fe8800f8edb6f54bff03658f1cb9d9cbd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 7 Apr 2016 12:55:06 +0200 Subject: [PATCH] Removing Option from setup_rpc_server method return type --- parity/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parity/main.rs b/parity/main.rs index 11f9dd91d..011d761ef 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -274,7 +274,7 @@ fn setup_rpc_server( url: &str, cors_domain: &str, apis: Vec<&str> -) -> Option> { +) -> Box { use rpc::v1::*; let server = rpc::RpcServer::new(); @@ -296,7 +296,7 @@ fn setup_rpc_server( match start_result { Err(rpc::RpcServerError::IoError(err)) => die_with_io_error(err), Err(e) => die!("{:?}", e), - Ok(handle) => Some(Box::new(handle)), + Ok(handle) => Box::new(handle), } } @@ -604,7 +604,7 @@ impl Configuration { SocketAddr::from_str(&url).unwrap_or_else(|_| die!("{}: Invalid JSONRPC listen host/port given.", url)); let cors_domain = self.args.flag_rpccorsdomain.as_ref().unwrap_or(&self.args.flag_jsonrpc_cors); - setup_rpc_server( + Some(setup_rpc_server( service.client(), sync.clone(), account_service.clone(), @@ -612,7 +612,7 @@ impl Configuration { &url, &cors_domain, apis.split(',').collect() - ) + )) } else { None };