chore: silence unused import/variable/dead-code warnings (#101) (#126)

- obscura-net/cookies.rs: #[allow(dead_code)] on CookieEntry.same_site
  (parsed today, kept for future SameSite enforcement).
- obscura-js/runtime.rs: drop vestigial BOOTSTRAP_JS const; bootstrap.js
  is already embedded into the V8 snapshot via build.rs.
- obscura-js/ops.rs: prefix the four unused fields in
  InterceptResolution::Continue with _.
- obscura-cdp/dispatch.rs: drop unused InterceptResolution import.
- obscura-cdp/domains/fetch.rs: drop unused Arc / Mutex / CdpEvent imports.
- obscura-cdp/domains/input.rs: prefix _button / _click_count; CDP
  parses them but the JS click stub is hardcoded for now.
- obscura-cdp/server.rs: prefix _processor_handle and _ctx; drop dead
  initial Ok(())/None for navigate_result/page_back - they are
  unconditionally overwritten in the only loop break arm.

cargo build --workspace: 0 warnings.
cargo test --workspace: 113 passed.
This commit is contained in:
Adam Ma authored and GitHub committed 2026-05-09 17:52:32 +02:00
1 parent 61a3b9f44e
commit a8b1ec0968
7 files changed
+9 -13

No files matched your search

+4 -4
View File
@@ -55,7 +55,7 @@ pub async fn start_with_full_options(
.run_until(async {
let (msg_tx, msg_rx) = mpsc::unbounded_channel::<ServerMessage>();
let processor_handle = tokio::task::spawn_local(cdp_processor(msg_rx, proxy, stealth, user_agent));
let _processor_handle = tokio::task::spawn_local(cdp_processor(msg_rx, proxy, stealth, user_agent));
loop {
match listener.accept().await {
@@ -120,7 +120,7 @@ async fn cdp_processor(
fn handle_fetch_resolution(
text: &str,
ctx: &mut CdpContext,
_ctx: &mut CdpContext,
reply_tx: &mpsc::UnboundedSender<String>,
intercepted_paused: &mut HashMap<String, tokio::sync::oneshot::Sender<obscura_js::ops::InterceptResolution>>,
) {
@@ -247,8 +247,8 @@ async fn process_with_interception(
let _ = nav_done_tx.send((page, result)).await;
});
let mut navigate_result: Result<(), String> = Ok(());
let mut page_back: Option<obscura_browser::Page> = None;
let navigate_result: Result<(), String>;
let page_back: Option<obscura_browser::Page>;
loop {
let has_irx = intercept_rx.is_some();