clippy: Disallow lints `collapsible_*`

The three lints `collapsible_{if,else_if,match}` are disallowed.
This commit is contained in:
Lorenz Leutgeb 2026-04-15 00:40:20 +02:00
parent 44244dc00f
commit ca732015fb
No known key found for this signature in database
7 changed files with 4 additions and 15 deletions

View File

@ -1,4 +1,3 @@
#![allow(clippy::collapsible_else_if)]
use std::borrow::Cow;
use std::collections::HashMap;
use std::path::{Path, PathBuf};

View File

@ -1,5 +1,4 @@
#![allow(clippy::or_fun_call)]
#![allow(clippy::collapsible_else_if)]
mod args;

View File

@ -39,10 +39,8 @@ pub fn run(
continue;
}
};
if !authors.is_empty() {
if !authors.contains(patch.author().id()) {
continue;
}
if !authors.is_empty() && !authors.contains(patch.author().id()) {
continue;
}
all.push((id, patch));
}

View File

@ -1,4 +1,3 @@
#![allow(clippy::collapsible_if)]
#![allow(clippy::or_fun_call)]
#![allow(clippy::too_many_arguments)]
pub mod commands;

View File

@ -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,10 +386,8 @@ where
let conn = (node, id);
let attempted = link.is_outbound() && self.attempts.remove(&conn);
if attempted || link.is_inbound() {
if self.connections.insert(conn) {
p.connected(id, addr, link);
}
if (attempted || link.is_inbound()) && self.connections.insert(conn) {
p.connected(id, addr, link);
}
}
Input::Disconnected(id, reason) => {

View File

@ -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};

View File

@ -1,4 +1,3 @@
#![allow(clippy::collapsible_if)]
mod features;
pub mod address;