remove some allow annotions and fix resulting warnings

This commit is contained in:
2019-05-07 17:46:17 +02:00
parent cd5e69145f
commit 66fc54cb3e
11 changed files with 20 additions and 33 deletions

View File

@ -3,7 +3,7 @@ use super::*;
use std::io::*;
use std::net::*;
use serde::{Deserialize, Serialize};
use serde::Serialize;
pub struct Connection<R: Read + Sized, W: Write + Sized> {
reader: R,
@ -139,9 +139,9 @@ impl<R: Read + Sized, W: Write + Sized> Connection<R, W> {
_ => (), // else try other
}
let json: Command = serde_json::from_slice(&payload[..]).map_err(|e| {
let json: Command = serde_json::from_slice(&payload[..]).map_err(|_e| {
#[cfg(test)]
dbg!(&e);
dbg!(&_e);
Error::new(ErrorKind::InvalidData, "Invalid JSON.")
})?;