fix more clippy warnings

This commit is contained in:
Joakim Frostegård 2020-08-02 00:36:56 +02:00
parent aabdf76a5d
commit 561cc3db55
16 changed files with 83 additions and 106 deletions

View file

@ -12,6 +12,8 @@ use crate::config::*;
use crate::utils::create_random_request;
// Allow large enum variant WebSocket because it should be very common
#[allow(clippy::large_enum_variant)]
pub enum ConnectionState {
TcpStream(TcpStream),
WebSocket(WebSocket<TcpStream>),
@ -321,11 +323,8 @@ pub fn run_socket_thread(
}
connections.insert(k, connection);
} else {
if let Some(connection) = connection.advance(config){
connections.insert(k, connection);
}
} else if let Some(c) = connection.advance(config){
connections.insert(k, c);
}
} else {
// println!("connection not found for token {}", k);