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::borrow::Cow;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#![allow(clippy::or_fun_call)]
|
#![allow(clippy::or_fun_call)]
|
||||||
#![allow(clippy::collapsible_else_if)]
|
|
||||||
|
|
||||||
mod args;
|
mod args;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,8 @@ pub fn run(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if !authors.is_empty() {
|
if !authors.is_empty() && !authors.contains(patch.author().id()) {
|
||||||
if !authors.contains(patch.author().id()) {
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
all.push((id, patch));
|
all.push((id, patch));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#![allow(clippy::collapsible_if)]
|
|
||||||
#![allow(clippy::or_fun_call)]
|
#![allow(clippy::or_fun_call)]
|
||||||
#![allow(clippy::too_many_arguments)]
|
#![allow(clippy::too_many_arguments)]
|
||||||
pub mod commands;
|
pub mod commands;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
//! A simple P2P network simulator. Acts as the _reactor_, but without doing any I/O.
|
//! A simple P2P network simulator. Acts as the _reactor_, but without doing any I/O.
|
||||||
#![allow(clippy::collapsible_if)]
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
@ -387,10 +386,8 @@ where
|
||||||
let conn = (node, id);
|
let conn = (node, id);
|
||||||
|
|
||||||
let attempted = link.is_outbound() && self.attempts.remove(&conn);
|
let attempted = link.is_outbound() && self.attempts.remove(&conn);
|
||||||
if attempted || link.is_inbound() {
|
if (attempted || link.is_inbound()) && self.connections.insert(conn) {
|
||||||
if self.connections.insert(conn) {
|
p.connected(id, addr, link);
|
||||||
p.connected(id, addr, link);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Input::Disconnected(id, reason) => {
|
Input::Disconnected(id, reason) => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
#![allow(clippy::too_many_arguments)]
|
#![allow(clippy::too_many_arguments)]
|
||||||
#![allow(clippy::collapsible_match)]
|
|
||||||
#![allow(clippy::collapsible_if)]
|
|
||||||
#![warn(clippy::unwrap_used)]
|
#![warn(clippy::unwrap_used)]
|
||||||
pub mod command;
|
pub mod command;
|
||||||
pub use command::{Command, QueryState};
|
pub use command::{Command, QueryState};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#![allow(clippy::collapsible_if)]
|
|
||||||
mod features;
|
mod features;
|
||||||
|
|
||||||
pub mod address;
|
pub mod address;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue