diff options
Diffstat (limited to 'components/devtools/protocol.rs')
-rw-r--r-- | components/devtools/protocol.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/devtools/protocol.rs b/components/devtools/protocol.rs index e657741b9e3..be27eed2ec1 100644 --- a/components/devtools/protocol.rs +++ b/components/devtools/protocol.rs @@ -5,12 +5,13 @@ /// Low-level wire protocol implementation. Currently only supports [JSON packets](https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport#JSON_Packets). use serialize::{json, Encodable}; +use serialize::json::Json; use std::io::{IoError, OtherIoError, EndOfFile, TcpStream, IoResult}; use std::num; pub trait JsonPacketStream { fn write_json_packet<'a, T: Encodable<json::Encoder<'a>,IoError>>(&mut self, obj: &T); - fn read_json_packet(&mut self) -> IoResult<json::Json>; + fn read_json_packet(&mut self) -> IoResult<Json>; } impl JsonPacketStream for TcpStream { @@ -22,7 +23,7 @@ impl JsonPacketStream for TcpStream { self.write_str(s.as_slice()).unwrap(); } - fn read_json_packet<'a>(&mut self) -> IoResult<json::Json> { + fn read_json_packet<'a>(&mut self) -> IoResult<Json> { // https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport // In short, each JSON packet is [ascii length]:[JSON data of given length] let mut buffer = vec!(); |