From b51e83819dfc2fded3a10744b353338f75ccae4d Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 1 Jan 2015 21:49:19 +0100 Subject: Fix obsolete format traits. They are to be removed from the language in the next rust upgrade. --- components/devtools/protocol.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/devtools/protocol.rs') diff --git a/components/devtools/protocol.rs b/components/devtools/protocol.rs index 52cfdaa3536..e657741b9e3 100644 --- a/components/devtools/protocol.rs +++ b/components/devtools/protocol.rs @@ -16,7 +16,7 @@ pub trait JsonPacketStream { impl JsonPacketStream for TcpStream { fn write_json_packet<'a, T: Encodable,IoError>>(&mut self, obj: &T) { let s = json::encode(obj).replace("__type__", "type"); - println!("<- {:s}", s); + println!("<- {}", s); self.write_str(s.len().to_string().as_slice()).unwrap(); self.write_u8(':' as u8).unwrap(); self.write_str(s.as_slice()).unwrap(); @@ -35,7 +35,7 @@ impl JsonPacketStream for TcpStream { let packet_len = num::from_str_radix(packet_len_str.as_slice(), 10).unwrap(); let packet_buf = self.read_exact(packet_len).unwrap(); let packet = String::from_utf8(packet_buf).unwrap(); - println!("{:s}", packet); + println!("{}", packet); return Ok(json::from_str(packet.as_slice()).unwrap()) }, Err(ref e) if e.kind == EndOfFile => -- cgit v1.2.3