Drop unused context field from obscura::Page (#274)

The wrapper Page cloned a second Arc<BrowserContext> 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
This commit is contained in:
SGavrl authored and GitHub committed 2026-06-09 08:55:46 +02:00
1 parent 82b7a0baa8
commit f64aca8064
2 files changed
+1 -4

No files matched your search

-1
View File
@@ -57,7 +57,6 @@ impl Browser {
); );
Ok(Page { Ok(Page {
inner: page, inner: page,
context: self.context.clone(),
}) })
} }
+1 -3
View File
@@ -1,8 +1,7 @@
use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
use obscura_browser::lifecycle::WaitUntil; use obscura_browser::lifecycle::WaitUntil;
use obscura_browser::{BrowserContext, Page as InnerPage}; use obscura_browser::Page as InnerPage;
use serde_json::Value; use serde_json::Value;
use crate::error::Error; use crate::error::Error;
@@ -18,7 +17,6 @@ fn nid_from_value(v: &Value) -> Option<u64> {
/// A browser tab/page. /// A browser tab/page.
pub struct Page { pub struct Page {
pub(crate) inner: InnerPage, pub(crate) inner: InnerPage,
pub(crate) context: Arc<BrowserContext>,
} }
impl Page { impl Page {