From df81163b3d4616860d5ce3456f30b017dcecbe32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B6=BE=E7=80=AC=E6=A1=83=E6=A1=83?= Date: Thu, 5 Nov 2026 23:11:33 +0800 Subject: [PATCH] refactor(wasm): name the metadata transform result type --- senbei-wasm/src/lib.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/senbei-wasm/src/lib.rs b/senbei-wasm/src/lib.rs index 3579ea1..05704ee 100644 --- a/senbei-wasm/src/lib.rs +++ b/senbei-wasm/src/lib.rs @@ -264,6 +264,8 @@ pub fn deobfuscate_metadata_reported(data: &[u8]) -> MetadataReport { MetadataReport::from_outcome(version, profile, result) } +type MetadataTransform = Result<(Vec, senbei_metadata::Report), senbei_metadata::Error>; + /// Build the metadata profile the same way the I/O report does, so the browser /// export and the CLI JSON report describe one transform identically. /// @@ -273,13 +275,7 @@ pub fn deobfuscate_metadata_reported(data: &[u8]) -> MetadataReport { /// nothing was transformed, so there is no protection evidence; /// * the PE static check does not apply to metadata output, so /// `static_validation` stays `not_run` in every case. -fn metadata_outcome( - data: &[u8], -) -> ( - Option, - ProtectionProfile, - Result<(Vec, senbei_metadata::Report), senbei_metadata::Error>, -) { +fn metadata_outcome(data: &[u8]) -> (Option, ProtectionProfile, MetadataTransform) { use senbei_engine::{ AttemptOutcome, LayoutAttempt, LayoutKind, ObservedTarget, ProtectionEvidence, RecognitionStatus, RecoveryStatus, ValidationStatus,