From fdcc7653f2783ad6702d1dc4dabca24e1811b1cf Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 2 Jan 2020 16:41:47 +0100 Subject: Fix some warnings in future Rust nightlies --- components/devtools/protocol.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'components/devtools/protocol.rs') diff --git a/components/devtools/protocol.rs b/components/devtools/protocol.rs index bfc547f6b75..29fbaa2beeb 100644 --- a/components/devtools/protocol.rs +++ b/components/devtools/protocol.rs @@ -8,7 +8,6 @@ use serde::Serialize; use serde_json::{self, Value}; -use std::error::Error; use std::io::{Read, Write}; use std::net::TcpStream; @@ -62,7 +61,7 @@ impl JsonPacketStream for TcpStream { Ok(0) => return Ok(None), // EOF Ok(1) => buf[0], Ok(_) => unreachable!(), - Err(e) => return Err(e.description().to_owned()), + Err(e) => return Err(e.to_string()), }; match byte { b':' => { @@ -79,7 +78,7 @@ impl JsonPacketStream for TcpStream { debug!("{}", packet); return match serde_json::from_str(&packet) { Ok(json) => Ok(Some(json)), - Err(err) => Err(err.description().to_owned()), + Err(err) => Err(err.to_string()), }; }, c => buffer.push(c), -- cgit v1.2.3