Apply suggestions from clippy

This commit is contained in:
Dirkjan Ochtman
2020-04-23 22:21:33 +02:00
committed by Benjamin Saunders
parent 3a414cc288
commit f6904d6140
4 changed files with 3 additions and 13 deletions
+2 -6
View File
@@ -10,16 +10,12 @@ pub enum ParseError {
impl From<prefix_int::Error> for ParseError {
fn from(e: prefix_int::Error) -> Self {
match e {
e => ParseError::InvalidInteger(e),
}
ParseError::InvalidInteger(e)
}
}
impl From<prefix_string::Error> for ParseError {
fn from(e: prefix_string::Error) -> Self {
match e {
e => ParseError::InvalidString(e),
}
ParseError::InvalidString(e)
}
}
-1
View File
@@ -283,7 +283,6 @@ mod test {
MAX_CID_SIZE,
};
use hex_literal::hex;
use rand;
#[test]
fn handshake_crypto_roundtrip() {
-1
View File
@@ -5,7 +5,6 @@ use std::{
};
use futures::ready;
use mio;
use tokio::io::PollEvented;
+1 -5
View File
@@ -76,11 +76,7 @@ fn connect_n_nodes_to_1_and_send_1mb_data() {
match e {
WriteError::ConnectionClosed(ApplicationClosed { .. })
| WriteError::ConnectionClosed(Reset) => {}
WriteError::ConnectionClosed(e) => match e {
_ => {
shared.lock().unwrap().errors.push(e);
}
},
WriteError::ConnectionClosed(e) => shared.lock().unwrap().errors.push(e),
_ => panic!("unexpected write error"),
}
});