aboutsummaryrefslogtreecommitdiffstats
path: root/components/devtools/protocol.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2020-01-02 16:41:47 +0100
committerSimon Sapin <simon.sapin@exyr.org>2020-01-02 19:22:03 +0100
commitfdcc7653f2783ad6702d1dc4dabca24e1811b1cf (patch)
tree8be99a41a05a80884d79fbc20af85c35560e039e /components/devtools/protocol.rs
parent728133611656f37480b96103dcc1d025f7d12ba3 (diff)
downloadservo-fdcc7653f2783ad6702d1dc4dabca24e1811b1cf.tar.gz
servo-fdcc7653f2783ad6702d1dc4dabca24e1811b1cf.zip
Fix some warnings in future Rust nightlies
Diffstat (limited to 'components/devtools/protocol.rs')
-rw-r--r--components/devtools/protocol.rs5
1 files changed, 2 insertions, 3 deletions
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),