From a8623a5e867825400073d2597dfb3118d6624ef7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 24 Jun 2026 04:51:47 +0900 Subject: chore: unwrap meaningless PhpMixed::String() --- crates/shirabe/src/package/loader/validating_array_loader.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'crates/shirabe/src/package/loader/validating_array_loader.rs') diff --git a/crates/shirabe/src/package/loader/validating_array_loader.rs b/crates/shirabe/src/package/loader/validating_array_loader.rs index 8081664..342e1cb 100644 --- a/crates/shirabe/src/package/loader/validating_array_loader.rs +++ b/crates/shirabe/src/package/loader/validating_array_loader.rs @@ -196,7 +196,7 @@ impl ValidatingArrayLoader { if !is_string(&license) { self.warnings.push(format!( "License {} should be a string.", - PhpMixed::String(json_encode(&license).unwrap_or_default()), + json_encode(&license).unwrap_or_default(), )); licenses.shift_remove(index); } @@ -219,18 +219,15 @@ impl ValidatingArrayLoader { { self.warnings.push(format!( "License {} must not contain extra spaces, make sure to trim it.", - PhpMixed::String( json_encode(&PhpMixed::String(license_str.clone())) .unwrap_or_default(), - ), )); } else { self.warnings.push(format!( "License {} is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.{}If the software is closed-source, you may use \"proprietary\" as license.", - PhpMixed::String( + json_encode(&PhpMixed::String(license_str.clone())) .unwrap_or_default(), - ), PHP_EOL )); } @@ -248,7 +245,7 @@ impl ValidatingArrayLoader { } else { self.warnings.push(format!( "License must be a string or array of strings, got {}.", - PhpMixed::String(json_encode(&license_val).unwrap_or_default(),), + json_encode(&license_val).unwrap_or_default(), )); self.config.shift_remove("license"); } -- cgit v1.3.1