Skip to content

Commit

Permalink
chore(deps): unpin bytes + serde (#221)
Browse files Browse the repository at this point in the history
* chore(deps): unpin bytes

* chore(clippy): fix pdl multiple bound locations generate_struct

* chore(clippy): fix cdp multiple bound locations downcast arc

* chore(frame): fix inefficient name clone on navigate
  • Loading branch information
j-mendez authored May 28, 2024
1 parent bd62ee3 commit 741abe1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tokio = { version = "1", features = [
tracing = "0.1"
pin-project-lite = "0.2"
dunce = "1"
bytes = { version = "1.4.0", features = ["serde"], optional = true }
bytes = { version = "1", features = ["serde"], optional = true }
reqwest = { version = "0.12", default-features = false }

[target.'cfg(windows)'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions chromiumoxide_cdp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ tempfile = "3.2.0"
[dependencies]
chromiumoxide_pdl = { path = "../chromiumoxide_pdl", version = "0.5"}
chromiumoxide_types = { path = "../chromiumoxide_types", version = "0.5"}
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.72"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
4 changes: 2 additions & 2 deletions chromiumoxide_cdp/src/cdp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ pub(crate) mod sealed {
self.as_any().is::<T>()
}
#[inline]
pub fn downcast_arc<T: SealedEvent>(
pub fn downcast_arc<T>(
self: ::std::sync::Arc<Self>,
) -> Result<::std::sync::Arc<T>, ::std::sync::Arc<Self>>
where
T: ::std::any::Any + Send + Sync,
T: ::std::any::Any + Send + Sync + SealedEvent,
{
if self.is::<T>() {
Ok(ArcAny::into_any_arc(self).downcast::<T>().unwrap())
Expand Down
4 changes: 2 additions & 2 deletions chromiumoxide_pdl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ regex = "1.5.4"
quote = "1.0.10"
proc-macro2 = "1.0.32"
heck = "0.4"
serde_json = "1.0.72"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1"
serde = { version = "1", features = ["derive"] }
chromiumoxide_types = { path = "../chromiumoxide_types", version = "0.5"}
either = "1.6.1"
2 changes: 1 addition & 1 deletion chromiumoxide_pdl/src/build/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ impl Generator {

/// Generates the struct definitions including enum definitions inner
/// parameter enums
fn generate_struct<'a, T: 'a>(
fn generate_struct<'a, T>(
&mut self,
domain: &Domain,
dt: &DomainDatatype,
Expand Down
4 changes: 2 additions & 2 deletions chromiumoxide_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ readme = "../README.md"
include = ["src/**/*", "LICENSE-*"]

[dependencies]
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.72"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
2 changes: 0 additions & 2 deletions src/browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,11 +914,9 @@ impl BrowserConfig {
HeadlessMode::False => (),
HeadlessMode::True => {
cmd.args(["--headless", "--hide-scrollbars", "--mute-audio"]);
()
}
HeadlessMode::New => {
cmd.args(["--headless=new", "--hide-scrollbars", "--mute-audio"]);
()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/handler/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Frame {
}

fn navigated(&mut self, frame: &CdpFrame) {
self.name = frame.name.clone();
self.name.clone_from(&frame.name);
let url = if let Some(ref fragment) = frame.url_fragment {
format!("{}{fragment}", frame.url)
} else {
Expand Down

0 comments on commit 741abe1

Please sign in to comment.