chore(clippy): enable and fix many stricter lints (#3783)

* chore(clippy): enable and fix many stricter lints

These ensure that the codebase uses more idiomatic, performant, and
concise language constructions.

* chore: make non-Clippy compiler warnings also deny by default
This commit is contained in:
Alejandro González
2025-06-14 02:10:12 +02:00
committed by GitHub
parent 301967d204
commit f84f8c1c2b
106 changed files with 542 additions and 760 deletions

View File

@@ -77,7 +77,6 @@ pub enum SupportedGameVersions {
All,
PastDate(DateTime<Utc>),
Range(DateTime<Utc>, DateTime<Utc>),
#[allow(dead_code)]
Custom(Vec<MinecraftGameVersion>),
}
@@ -232,8 +231,7 @@ fn game_version_supported(
all_game_versions
.iter()
.find(|y| y.version == x.version)
.map(|x| x.created > date)
.unwrap_or(false)
.is_some_and(|x| x.created > date)
})
}
SupportedGameVersions::Range(before, after) => {
@@ -241,8 +239,7 @@ fn game_version_supported(
all_game_versions
.iter()
.find(|y| y.version == x.version)
.map(|x| x.created > before && x.created < after)
.unwrap_or(false)
.is_some_and(|x| x.created > before && x.created < after)
})
}
SupportedGameVersions::Custom(versions) => {