mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-29 07:40:14 +01:00
Try out type ascription
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
//! ```
|
||||
|
||||
#![deny(missing_docs)]
|
||||
#![feature(custom_derive, plugin, test)]
|
||||
#![feature(custom_derive, plugin, test, type_ascription)]
|
||||
#![plugin(serde_macros)]
|
||||
|
||||
extern crate serde;
|
||||
|
||||
@@ -235,7 +235,7 @@ fn read<Reply>(requests: Arc<Mutex<RpcFutures<Reply>>>, stream: TcpStream)
|
||||
{
|
||||
let mut stream = BufReader::new(stream);
|
||||
loop {
|
||||
match stream.deserialize::<Packet<Reply>>() {
|
||||
match stream.deserialize() : Result<Packet<Reply>> {
|
||||
Ok(packet) => {
|
||||
debug!("Client: received message, id={}", packet.rpc_id);
|
||||
requests.lock().expect(pos!()).complete_reply(packet);
|
||||
|
||||
Reference in New Issue
Block a user