From d54d3a2c60f7d30f16a169963b8fe0c8760a0b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 9 Jun 2016 15:19:48 +0200 Subject: [PATCH] Fixing match --- rpc/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index ad2d52495..43c120e40 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -75,10 +75,10 @@ impl RpcServer { /// Start http server asynchronously and returns result with `Server` handle on success or an error. pub fn start_http(&self, addr: &SocketAddr, cors_domains: Vec) -> Result { let cors_domains = cors_domains.into_iter() - .map(|v| match v { - ref v if v == "*" => jsonrpc_http_server::AccessControlAllowOrigin::Any, - ref v if v == "null" => jsonrpc_http_server::AccessControlAllowOrigin::Null, - v => jsonrpc_http_server::AccessControlAllowOrigin::Value(v), + .map(|v| match v.as_str() { + "*" => jsonrpc_http_server::AccessControlAllowOrigin::Any, + "null" => jsonrpc_http_server::AccessControlAllowOrigin::Null, + v => jsonrpc_http_server::AccessControlAllowOrigin::Value(v.into()), }) .collect(); Server::start(addr, self.handler.clone(), cors_domains)