modified to use map instead of match.

This commit is contained in:
Josh Leverette 2016-01-11 23:35:38 -06:00
parent bc1850240f
commit 1bde88395c

View file

@ -228,15 +228,11 @@ impl WebGLPaintThread {
} }
}); });
match result_port.recv() { result_port.recv().unwrap().map(|_| {
Ok(_) => { let (out_of_process_chan, out_of_process_port) = ipc::channel::<CanvasMsg>().unwrap();
let (out_of_process_chan, out_of_process_port) = ipc::channel::<CanvasMsg>().unwrap(); ROUTER.route_ipc_receiver_to_mpsc_sender(out_of_process_port, in_process_chan.clone());
ROUTER.route_ipc_receiver_to_mpsc_sender(out_of_process_port, in_process_chan.clone()); (out_of_process_chan, in_process_chan)
})
Ok((out_of_process_chan, in_process_chan))
},
Err(_) => Err("Could not create WebGLPaintThread.")
}
} }
#[inline] #[inline]