Socket cleanup (#682)

* testing changes

* added success

* removed success

* Fix compile error

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
This commit is contained in:
Wyatt Verchere
2023-08-21 11:21:05 -07:00
committed by GitHub
parent e9c7f5d664
commit a1cfdf1a5b
5 changed files with 62 additions and 29 deletions

View File

@@ -134,10 +134,11 @@ impl super::Validator for SpongeValidator {
&self,
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
) -> Result<ValidationResult, ValidationError> {
if !archive
.file_names()
.any(|name| name == "sponge_plugins.json" || name == "mcmod.info" || name == "META-INF/sponge_plugins.json")
{
if !archive.file_names().any(|name| {
name == "sponge_plugins.json"
|| name == "mcmod.info"
|| name == "META-INF/sponge_plugins.json"
}) {
return Ok(ValidationResult::Warning(
"No sponge_plugins.json or mcmod.info present for Sponge plugin.",
));