Reformat rust code with rustfmt 1.0
diff --git a/lib/rs/src/server/threaded.rs b/lib/rs/src/server/threaded.rs
index 515b20d..8139a4e 100644
--- a/lib/rs/src/server/threaded.rs
+++ b/lib/rs/src/server/threaded.rs
@@ -19,9 +19,9 @@
use std::sync::Arc;
use threadpool::ThreadPool;
-use {ApplicationError, ApplicationErrorKind};
use protocol::{TInputProtocol, TInputProtocolFactory, TOutputProtocol, TOutputProtocolFactory};
use transport::{TIoChannel, TReadTransportFactory, TTcpChannel, TWriteTransportFactory};
+use {ApplicationError, ApplicationErrorKind};
use super::TProcessor;
@@ -129,11 +129,13 @@
}
impl<PRC, RTF, IPF, WTF, OPF> TServer<PRC, RTF, IPF, WTF, OPF>
- where PRC: TProcessor + Send + Sync + 'static,
- RTF: TReadTransportFactory + 'static,
- IPF: TInputProtocolFactory + 'static,
- WTF: TWriteTransportFactory + 'static,
- OPF: TOutputProtocolFactory + 'static {
+where
+ PRC: TProcessor + Send + Sync + 'static,
+ RTF: TReadTransportFactory + 'static,
+ IPF: TInputProtocolFactory + 'static,
+ WTF: TWriteTransportFactory + 'static,
+ OPF: TOutputProtocolFactory + 'static,
+{
/// Create a `TServer`.
///
/// Each accepted connection has an input and output half, each of which
@@ -155,10 +157,7 @@
w_trans_factory: write_transport_factory,
o_proto_factory: output_protocol_factory,
processor: Arc::new(processor),
- worker_pool: ThreadPool::with_name(
- "Thrift service processor".to_owned(),
- num_workers,
- ),
+ worker_pool: ThreadPool::with_name("Thrift service processor".to_owned(), num_workers),
}
}
@@ -179,7 +178,7 @@
let (i_prot, o_prot) = self.new_protocols_for_connection(s)?;
let processor = self.processor.clone();
self.worker_pool
- .execute(move || handle_incoming_connection(processor, i_prot, o_prot),);
+ .execute(move || handle_incoming_connection(processor, i_prot, o_prot));
}
Err(e) => {
warn!("failed to accept remote connection with error {:?}", e);
@@ -187,17 +186,12 @@
}
}
- Err(
- ::Error::Application(
- ApplicationError {
- kind: ApplicationErrorKind::Unknown,
- message: "aborted listen loop".into(),
- },
- ),
- )
+ Err(::Error::Application(ApplicationError {
+ kind: ApplicationErrorKind::Unknown,
+ message: "aborted listen loop".into(),
+ }))
}
-
fn new_protocols_for_connection(
&mut self,
stream: TcpStream,