clippy: Disallow lint `type_complexity`

We just need two exceptions.
This commit is contained in:
Lorenz Leutgeb 2026-04-15 00:42:57 +02:00
parent ffc81154e4
commit 44244dc00f
No known key found for this signature in database
9 changed files with 2 additions and 8 deletions

View File

@ -89,7 +89,6 @@ fallible_impl_from = "deny"
fn_params_excessive_bools = "deny"
indexing_slicing = "deny"
must_use_candidate = "deny"
type_complexity = "allow"
unneeded_field_pattern = "deny"
wildcard_enum_match_arm = "deny"

View File

@ -198,6 +198,7 @@ impl ReviewItem {
self.hunk().and_then(|h| HunkHeader::try_from(h).ok())
}
#[allow(clippy::type_complexity)]
fn paths(&self) -> (Option<(&Path, Oid)>, Option<(&Path, Oid)>) {
match self {
Self::FileAdded { path, new, .. } => (None, Some((path, Oid::from(*new.oid)))),

View File

@ -1,7 +1,6 @@
//! A simple P2P network simulator. Acts as the _reactor_, but without doing any I/O.
#![allow(clippy::collapsible_if)]
#![allow(dead_code)]
#![allow(clippy::type_complexity)]
use std::cell::RefCell;
use std::collections::{BTreeMap, BTreeSet, HashSet, VecDeque};

View File

@ -1,6 +1,5 @@
//! Generic COB storage.
#![allow(clippy::large_enum_variant)]
#![allow(clippy::type_complexity)]
use std::fmt::Debug;
use std::marker::PhantomData;

View File

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

View File

@ -1,4 +1,3 @@
#![allow(clippy::type_complexity)]
use std::marker::PhantomData;
use std::num::TryFromIntError;
use std::path::Path;

View File

@ -1,4 +1,3 @@
#![allow(clippy::type_complexity)]
use std::collections::{BTreeMap, BTreeSet};
use std::marker::PhantomData;
use std::path::Path;

View File

@ -1,4 +1,3 @@
#![allow(clippy::type_complexity)]
use std::num::TryFromIntError;
use std::str::FromStr;

View File

@ -1,4 +1,3 @@
#![allow(clippy::type_complexity)]
use std::str::FromStr;
use localtime::LocalTime;
@ -35,6 +34,7 @@ pub trait Store: address::Store {
timestamp: Timestamp,
) -> Result<bool, Error>;
/// Get the repos seeded by the given node.
#[allow(clippy::type_complexity)]
fn seeded_by(
&self,
nid: &NodeId,