From 91b7780eb55f509d1bbcea63ca81c837162f1f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Str=C3=B6m?= Date: Thu, 6 Oct 2016 12:07:09 +0200 Subject: [PATCH] comment formating --- rpc_client/src/client.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/rpc_client/src/client.rs b/rpc_client/src/client.rs index c3c6edb0c..3b7d35447 100644 --- a/rpc_client/src/client.rs +++ b/rpc_client/src/client.rs @@ -158,17 +158,14 @@ impl Rpc { Err(e) => return done(Ok(Err(e))).boxed(), Ok(code) => { let url = String::from(url); - // The ws::connect takes a FnMut closure, - // which means c cannot be moved into it, - // since it's consumed on complete. - // Therefore we wrap it in an option - // and pick it out once. + // The ws::connect takes a FnMut closure, which means c cannot be + // moved into it, since it's consumed on complete. + // Therefore we wrap it in an option and pick it out once. let mut once = Some(c); thread::spawn(move || { let conn = ws::connect(url, |out| { - // this will panic if the closure - // is called twice, which it should never - // be. + // this will panic if the closure is called twice, + // which it should never be. let c = once.take().expect("connection closure called only once"); RpcHandler::new(out, code.clone(), c) });