From f64aca8064d67836804f979be225cbce820905da Mon Sep 17 00:00:00 2001 From: SGavrl <277843151+SGavrl@users.noreply.github.com> Date: Tue, 9 Jun 2026 06:55:46 +0000 Subject: [PATCH] Drop unused context field from obscura::Page (#274) The wrapper Page cloned a second Arc the struct never read. The inner obscura_browser::Page already holds the context and keeps it alive, so the field was dead weight. Removes the dead_code warning reported on aarch64 Closes #273 --- crates/obscura/src/browser.rs | 1 - crates/obscura/src/page.rs | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/obscura/src/browser.rs b/crates/obscura/src/browser.rs index 2c30d95..4575bce 100644 --- a/crates/obscura/src/browser.rs +++ b/crates/obscura/src/browser.rs @@ -57,7 +57,6 @@ impl Browser { ); Ok(Page { inner: page, - context: self.context.clone(), }) } diff --git a/crates/obscura/src/page.rs b/crates/obscura/src/page.rs index f8f1b33..07a9716 100644 --- a/crates/obscura/src/page.rs +++ b/crates/obscura/src/page.rs @@ -1,8 +1,7 @@ -use std::sync::Arc; use std::time::Duration; use obscura_browser::lifecycle::WaitUntil; -use obscura_browser::{BrowserContext, Page as InnerPage}; +use obscura_browser::Page as InnerPage; use serde_json::Value; use crate::error::Error; @@ -18,7 +17,6 @@ fn nid_from_value(v: &Value) -> Option { /// A browser tab/page. pub struct Page { pub(crate) inner: InnerPage, - pub(crate) context: Arc, } impl Page {