mirror of
https://github.com/servo/servo.git
synced 2025-06-10 09:33:13 +00:00
Fix some warnings in future Rust nightlies
This commit is contained in:
parent
7281336116
commit
fdcc7653f2
8 changed files with 20 additions and 45 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue