Skip to content

Commit

Permalink
Update dependencies (#154)
Browse files Browse the repository at this point in the history
* Upgrade async-tungstenite to 0.22

* Update winreg to 0.50

* Update tracing-subscriber to 0.3

* Add coverage to macOS and Windows in CI

* Add rust-version to Cargo metadata for low-level deps

* Test MSRV support in CI

* Bump MSRV to 1.64 for async-tungstenite

* Derive default for various enums
  • Loading branch information
djc authored Jul 24, 2023
1 parent f28943b commit efdbe88
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 27 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:

test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -61,4 +64,18 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: -- -D warnings

msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "1.64.0"
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --lib
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "chromiumoxide"
version = "0.5.0"
rust-version = "1.60"
rust-version = "1.64"
authors = ["Matthias Seitz <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -13,7 +13,7 @@ keywords = ["chrome", "chromedriver", "puppeteer", "automation"]
categories = ["web-programming", "api-bindings", "development-tools::testing"]

[dependencies]
async-tungstenite = "0.19"
async-tungstenite = "0.22"
serde = { version = "1", features = ["derive"] }
async-std = { version = "1.5", features = ["attributes", "unstable"], optional = true }
futures = "0.3"
Expand All @@ -34,13 +34,13 @@ pin-project-lite = "0.2"
dunce = "1"

[target.'cfg(windows)'.dependencies]
winreg = "0.10"
winreg = "0.50"

[dev-dependencies]
quote = "1"
proc-macro2 = "1"
chrono = "0.4.1"
tracing-subscriber = "0.2"
tracing-subscriber = "0.3"

[features]
default = ["async-std-runtime"]
Expand Down
1 change: 1 addition & 0 deletions chromiumoxide_cdp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "chromiumoxide_cdp"
version = "0.5.0"
authors = ["Matthias Seitz <[email protected]>"]
edition = "2021"
rust-version = "1.64"
description = "Contains all the generated types for chromiumoxide"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/mattsse/chromiumoxide"
Expand Down
1 change: 1 addition & 0 deletions chromiumoxide_fetcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "chromiumoxide_fetcher"
version = "0.5.0"
authors = ["Matthias Seitz <[email protected]>"]
edition = "2021"
rust-version = "1.64"
license = "MIT OR Apache-2.0"
description = "Contains a chromium fetcher"
homepage = "https://github.com/mattsse/chromiumoxide"
Expand Down
1 change: 1 addition & 0 deletions chromiumoxide_pdl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "chromiumoxide_pdl"
version = "0.5.0"
authors = ["Matthias Seitz <[email protected]>"]
edition = "2021"
rust-version = "1.64"
license = "MIT OR Apache-2.0"
description = "Contains a PDL parser and rust generator"
homepage = "https://github.com/mattsse/chromiumoxide"
Expand Down
9 changes: 2 additions & 7 deletions chromiumoxide_pdl/src/build/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,10 @@ fn subenum_name(parent: &str, inner: &str) -> String {
)
}

#[derive(Debug, Clone)]
#[derive(Debug, Default, Clone)]
pub enum SerdeSupport {
None,
#[default]
Default,
Feature(String),
}
Expand Down Expand Up @@ -1163,12 +1164,6 @@ impl SerdeSupport {
}
}

impl Default for SerdeSupport {
fn default() -> Self {
SerdeSupport::Default
}
}

pub fn fmt(out_dir: impl AsRef<Path>) {
use std::io::Write;
use std::process::Command;
Expand Down
9 changes: 2 additions & 7 deletions src/handler/domworld.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,12 @@ impl DOMWorld {
///
/// Besides pages, execution contexts can be found in
/// [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum DOMWorldKind {
/// The main world of a frame that represents the default execution context
/// of a frame and is also created.
#[default]
Main,
/// Each frame gets its own isolated world with universal access
Secondary,
}

impl Default for DOMWorldKind {
fn default() -> Self {
DOMWorldKind::Main
}
}
9 changes: 2 additions & 7 deletions src/handler/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,20 +667,15 @@ impl FrameNavigationRequest {
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum LifecycleEvent {
#[default]
Load,
DomcontentLoaded,
NetworkIdle,
NetworkAlmostIdle,
}

impl Default for LifecycleEvent {
fn default() -> Self {
LifecycleEvent::Load
}
}

impl AsRef<str> for LifecycleEvent {
fn as_ref(&self) -> &str {
match self {
Expand Down

0 comments on commit efdbe88

Please sign in to comment.