You've already forked AstralRinth
forked from didirus/AstralRinth
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:
committed by
GitHub
parent
301967d204
commit
f84f8c1c2b
@@ -28,14 +28,11 @@ impl super::Validator for ModpackValidator {
|
||||
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
|
||||
) -> Result<ValidationResult, ValidationError> {
|
||||
let pack: PackFormat = {
|
||||
let mut file =
|
||||
if let Ok(file) = archive.by_name("modrinth.index.json") {
|
||||
file
|
||||
} else {
|
||||
return Ok(ValidationResult::Warning(
|
||||
"Pack manifest is missing.",
|
||||
));
|
||||
};
|
||||
let Ok(mut file) = archive.by_name("modrinth.index.json") else {
|
||||
return Ok(ValidationResult::Warning(
|
||||
"Pack manifest is missing.",
|
||||
));
|
||||
};
|
||||
|
||||
let mut contents = String::new();
|
||||
file.read_to_string(&mut contents)?;
|
||||
@@ -109,7 +106,7 @@ impl super::Validator for ModpackValidator {
|
||||
|| x.starts_with("overrides/shaderpacks")
|
||||
|| x.starts_with("client-overrides/shaderpacks"))
|
||||
})
|
||||
.flat_map(|x| x.rsplit('/').next().map(|x| x.to_string()))
|
||||
.filter_map(|x| x.rsplit('/').next().map(|x| x.to_string()))
|
||||
.collect::<Vec<String>>(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user