mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use rustc-serialize rather than the built-in deprecated serialize.
This commit is contained in:
parent
4ab928728e
commit
aaed4a54c7
30 changed files with 54 additions and 33 deletions
|
@ -6,8 +6,8 @@
|
|||
//! [JSON packets]
|
||||
//! (https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport#JSON_Packets).
|
||||
|
||||
use serialize::{json, Encodable};
|
||||
use serialize::json::Json;
|
||||
use rustc_serialize::{json, Encodable};
|
||||
use rustc_serialize::json::Json;
|
||||
use std::old_io::{IoError, OtherIoError, EndOfFile, TcpStream, IoResult};
|
||||
use std::num;
|
||||
|
||||
|
@ -39,7 +39,7 @@ impl JsonPacketStream for TcpStream {
|
|||
let packet_buf = self.read_exact(packet_len).unwrap();
|
||||
let packet = String::from_utf8(packet_buf).unwrap();
|
||||
println!("{}", packet);
|
||||
return Ok(json::from_str(packet.as_slice()).unwrap())
|
||||
return Ok(Json::from_str(packet.as_slice()).unwrap())
|
||||
},
|
||||
Err(ref e) if e.kind == EndOfFile =>
|
||||
return Err(IoError { kind: EndOfFile, desc: "EOF", detail: None }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue