clippy: Disallow lints `collapsible_*`
The three lints `collapsible_{if,else_if,match}` are disallowed.
This commit is contained in:
parent
44244dc00f
commit
ca732015fb
|
|
@ -1,4 +1,3 @@
|
|||
#![allow(clippy::collapsible_else_if)]
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#![allow(clippy::or_fun_call)]
|
||||
#![allow(clippy::collapsible_else_if)]
|
||||
|
||||
mod args;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,11 +39,9 @@ pub fn run(
|
|||
continue;
|
||||
}
|
||||
};
|
||||
if !authors.is_empty() {
|
||||
if !authors.contains(patch.author().id()) {
|
||||
if !authors.is_empty() && !authors.contains(patch.author().id()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
all.push((id, patch));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#![allow(clippy::collapsible_if)]
|
||||
#![allow(clippy::or_fun_call)]
|
||||
#![allow(clippy::too_many_arguments)]
|
||||
pub mod commands;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
//! A simple P2P network simulator. Acts as the _reactor_, but without doing any I/O.
|
||||
#![allow(clippy::collapsible_if)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
|
@ -387,12 +386,10 @@ where
|
|||
let conn = (node, id);
|
||||
|
||||
let attempted = link.is_outbound() && self.attempts.remove(&conn);
|
||||
if attempted || link.is_inbound() {
|
||||
if self.connections.insert(conn) {
|
||||
if (attempted || link.is_inbound()) && self.connections.insert(conn) {
|
||||
p.connected(id, addr, link);
|
||||
}
|
||||
}
|
||||
}
|
||||
Input::Disconnected(id, reason) => {
|
||||
let conn = (node, id);
|
||||
let attempt = self.attempts.remove(&conn);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
#![allow(clippy::too_many_arguments)]
|
||||
#![allow(clippy::collapsible_match)]
|
||||
#![allow(clippy::collapsible_if)]
|
||||
#![warn(clippy::unwrap_used)]
|
||||
pub mod command;
|
||||
pub use command::{Command, QueryState};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#![allow(clippy::collapsible_if)]
|
||||
mod features;
|
||||
|
||||
pub mod address;
|
||||
|
|
|
|||
Loading…
Reference in New Issue