mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-24 20:25:00 +00:00
Apply suggestions from clippy
This commit is contained in:
committed by
Benjamin Saunders
parent
3a414cc288
commit
f6904d6140
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +283,6 @@ mod test {
|
||||
MAX_CID_SIZE,
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use rand;
|
||||
|
||||
#[test]
|
||||
fn handshake_crypto_roundtrip() {
|
||||
|
||||
@@ -5,7 +5,6 @@ use std::{
|
||||
};
|
||||
|
||||
use futures::ready;
|
||||
use mio;
|
||||
|
||||
use tokio::io::PollEvented;
|
||||
|
||||
|
||||
@@ -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"),
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user