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

-3
View File
@@ -1,11 +1,8 @@
use std::collections::HashMap;
use std::sync::Arc;
use serde_json::{json, Value};
use tokio::sync::Mutex;
use crate::dispatch::CdpContext;
use crate::types::CdpEvent;
pub struct PausedRequest {
pub request_id: String,
+2 -2
View File
@@ -13,8 +13,8 @@ pub async fn handle(
let event_type = params.get("type").and_then(|v| v.as_str()).unwrap_or("");
let x = params.get("x").and_then(|v| v.as_f64()).unwrap_or(0.0);
let y = params.get("y").and_then(|v| v.as_f64()).unwrap_or(0.0);
let button = params.get("button").and_then(|v| v.as_str()).unwrap_or("left");
let click_count = params.get("clickCount").and_then(|v| v.as_u64()).unwrap_or(1);
let _button = params.get("button").and_then(|v| v.as_str()).unwrap_or("left");
let _click_count = params.get("clickCount").and_then(|v| v.as_u64()).unwrap_or(1);
if event_type == "mousePressed" {
if let Some(page) = ctx.get_session_page_mut(session_id) {