From 9fdf19959c899b6a1cd0be09d9dadbcc5c511ca3 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Tue, 6 Dec 2016 17:22:24 +0100 Subject: [PATCH] mostly revert #5, only import GenericIoHandler now Didn't realize the trait wasn't object-safe (should be done at some point but not now) --- ipc/src/win.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ipc/src/win.rs b/ipc/src/win.rs index 21a1af781..de206dc75 100644 --- a/ipc/src/win.rs +++ b/ipc/src/win.rs @@ -47,7 +47,7 @@ use std::io; use std::io::{Read, Write}; use std::sync::atomic::*; use std::sync::Arc; -use jsonrpc_core::GenericIoHandler; +use jsonrpc_core::{GenericIoHandler, IoHandler}; use validator; pub type Result = std::result::Result; @@ -72,12 +72,12 @@ impl std::convert::From for Error { pub struct PipeHandler { waiting_pipe: NamedPipe, - io_handler: Arc, + io_handler: Arc, } impl PipeHandler { /// start ipc rpc server (blocking) - pub fn start(addr: &str, io_handler: &Arc) -> Result { + pub fn start(addr: &str, io_handler: &Arc) -> Result { Ok(PipeHandler { waiting_pipe: try!( NamedPipeBuilder::new(addr) @@ -175,12 +175,12 @@ pub struct Server { is_stopping: Arc, is_stopped: Arc, addr: String, - io_handler: Arc, + io_handler: Arc, } impl Server { /// New server - pub fn new(socket_addr: &str, io_handler: &Arc) -> Result { + pub fn new(socket_addr: &str, io_handler: &Arc) -> Result { Ok(Server { io_handler: io_handler.clone(), is_stopping: Arc::new(AtomicBool::new(false)),