Drop dead Method variants, Downloader default fns, parsing/stream_helper unused, suppress_unused leftovers, stale comments
Second pass through the cruft inventory. All deletes — no behavior change.
Method enum + downloader trait:
* Method::Head / Put / Delete dropped (no caller). Match arms in
request.rs::as_str() and default_impl.rs::execute() collapse to
just Get / Post.
* Request::head builder dropped.
* Downloader trait's get / get_localized / head / post default
methods dropped. Every caller went through execute() directly
anyway; the convenience wrappers carried 4 dead arms each.
Parsing module:
* bootstrap_visitor_data — pub fn, no caller.
* discover_web_client_version + CACHED_WEB_CLIENT_VERSION +
reset_web_client_version_cache — entire sw.js live-version
discovery pipeline, never wired up by any caller. The cache was
never populated, so web_client_version() always returned the
hardcoded constant. Collapsed to just returning the constant.
* Drops once_cell::Lazy, parking_lot::RwLock around the version
cache (consent flag still uses RwLock), Regex import, serde_json::Value
import, downloader/exceptions/Request/InnertubeClientRequestInfo
imports — all only kept alive by the deleted code.
stream_helper:
* get_web_embedded_player_response — pub fn, no caller.
js/player_manager + extractor:
* player_manager::player_hash — pub fn, no caller. Was only kept
alive by its own definition.
* extractor::extract_player_hash — pub fn, only called by the now-
dead player_hash. Test removed alongside.
Stale comments:
* itag.rs:1 header claimed 53 entries; ITAG_TABLE has 57 and the
test at line 179 already asserts it.
* js/mod.rs:12-13 claimed the submodules were 'crate-private
plumbing' but they're declared pub mod. Tightened the comment to
explain the integration-test dependency that keeps them public.
Net delete: ~170 LOC of dead surface across 9 files.
This commit is contained in:
parent
d39cf61217
commit
f917e4adbd
9 changed files with 18 additions and 189 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// JS deobfuscator subsystem — mirrors NPE's player.js / sig / nsig pipeline.
|
||||
//
|
||||
// Public surface is the `player_manager` module (mirrors NPE's
|
||||
// YoutubeJavaScriptPlayerManager — the sole public class in the subsystem):
|
||||
// Production callers go through `player_manager` (mirrors NPE's
|
||||
// YoutubeJavaScriptPlayerManager):
|
||||
// * signature_timestamp(video_id)
|
||||
// * deobfuscate_signature(video_id, obfuscated)
|
||||
// * url_with_throttling_parameter_deobfuscated(video_id, url)
|
||||
|
|
@ -9,8 +9,10 @@
|
|||
// * clear_all_caches()
|
||||
// * clear_throttling_parameters_cache()
|
||||
//
|
||||
// Everything else (runtime / lexer / extractor / signature / nsig) is
|
||||
// crate-private plumbing.
|
||||
// The other submodules (runtime / lexer / extractor / signature / nsig) are
|
||||
// kept `pub` because `tests/js_phase2_offline.rs` exercises them directly
|
||||
// from outside the crate. If the integration test gets folded into the
|
||||
// inline `#[cfg(test)]` blocks, these can drop to `pub(crate)`.
|
||||
|
||||
pub mod extractor;
|
||||
pub mod lexer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue