Try out type ascription

This commit is contained in:
Tim Kuehn
2016-02-11 00:04:20 -08:00
parent 3a046e783c
commit 868938d83a
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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);