diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-02-17 12:51:16 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-02-17 13:24:15 +0100 |
commit | aaed4a54c700b85666a6aef6aa23e5fd315dd0d7 (patch) | |
tree | 57aaaabd556be56332dc5b13237373a05e10ae27 /components/devtools/protocol.rs | |
parent | 4ab928728e3d65ac4c6ca72cd6c8aa0c75fde33b (diff) | |
download | servo-aaed4a54c700b85666a6aef6aa23e5fd315dd0d7.tar.gz servo-aaed4a54c700b85666a6aef6aa23e5fd315dd0d7.zip |
Use rustc-serialize rather than the built-in deprecated serialize.
Diffstat (limited to 'components/devtools/protocol.rs')
-rw-r--r-- | components/devtools/protocol.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/devtools/protocol.rs b/components/devtools/protocol.rs index 5ce91fb729f..07534df139b 100644 --- a/components/devtools/protocol.rs +++ b/components/devtools/protocol.rs @@ -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 }), |