Upgrade to rustc ba2f13ef0 2015-02-04

This commit is contained in:
Simon Sapin 2015-01-31 14:36:05 +01:00 committed by Matt Brubeck
parent bc6882bdef
commit d5dd1d658e
136 changed files with 1091 additions and 878 deletions

View file

@ -8,7 +8,7 @@
use serialize::{json, Encodable};
use serialize::json::Json;
use std::io::{IoError, OtherIoError, EndOfFile, TcpStream, IoResult};
use std::old_io::{IoError, OtherIoError, EndOfFile, TcpStream, IoResult};
use std::num;
pub trait JsonPacketStream {
@ -18,7 +18,7 @@ pub trait JsonPacketStream {
impl JsonPacketStream for TcpStream {
fn write_json_packet<'a, T: Encodable>(&mut self, obj: &T) {
let s = json::encode(obj).replace("__type__", "type");
let s = json::encode(obj).unwrap().replace("__type__", "type");
println!("<- {}", s);
self.write_str(s.len().to_string().as_slice()).unwrap();
self.write_u8(':' as u8).unwrap();