Remove dead code from bun_url
Closed
RO
3mo ago+1+1+0123456789-65-65-01234567890123456789
Removes unreferenced items from src/url/lib.rs that were carried over from the Zig port but have no callers anywhere in the workspace.
Removed
URL::is_localhost(): zero references.QueryStringMap::get_index(): only called byhas(), which is itself unused.QueryStringMap::get(): zero references.QueryStringMap::has(): zero references.QueryStringMap::get_all(): only calledget_all_with_hash_from_offset(), zero external references.QueryStringMap::get_all_with_hash_from_offset(): only called byget_all().NAME_COUNT_BUFthread-local static: already annotated as unused, for the commented-out Zig path inget_name_count.QueryStringMap.name_countfield: set toNoneat all three construction sites and cloned, never read. Part of the same never-enabled caching mechanism asNAME_COUNT_BUF.use core::cell::RefCell: only used byNAME_COUNT_BUF.- Commented-out Zig body inside
get_name_count().
Also relaxes get_name_count(&mut self) to &self since the removed caching write was the only mutation.
The only out-of-crate consumer of QueryStringMap is src/runtime/api/filesystem_router.rs, which uses init, init_with_scanner, iter, get_name_count, and str only.
Verification
rgfor each symbol acrosssrc/,build/debug/codegen/, andsrc/codegen/: zero hits outsidesrc/url/lib.rs.bun bd: builds clean.bun run rust:check-all: all 10 targets pass.bun bd test test/js/bun/util/filesystem_router.test.ts: 29 pass, 0 fail.
Net: 1 file changed, 1 insertion, 65 deletions.