From 1211f601df5f04e435c1f912fe0d3888952b0c9f Mon Sep 17 00:00:00 2001 From: Kayos Date: Sun, 24 May 2026 12:21:55 -0700 Subject: [PATCH] deobfuscate: silence dead_code on Deobfuscator::has_sig/has_nsig Public API methods exposed for downstream consumers (e.g. straw can call deobf.has_sig() to skip cipher streams without observing an Err). The internal short-circuit uses the struct field directly so the methods register as unused at compile time. --- src/deobfuscate.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/deobfuscate.rs b/src/deobfuscate.rs index 8cf6172..703bc7b 100644 --- a/src/deobfuscate.rs +++ b/src/deobfuscate.rs @@ -197,11 +197,16 @@ impl Deobfuscator { } /// True when the underlying DeobfData had a valid sig fn extracted. + /// Exposed for consumers that want to short-circuit cipher streams + /// without invoking `deobfuscate_sig` and observing the error. + #[allow(dead_code)] pub fn has_sig(&self) -> bool { self.has_sig } /// True when the underlying DeobfData had a valid nsig fn extracted. + /// Exposed for consumers that want to short-circuit throttled URLs. + #[allow(dead_code)] pub fn has_nsig(&self) -> bool { self.has_nsig }