From 5a25622783c98eb31d8b44b7645118bb40cf6ce7 Mon Sep 17 00:00:00 2001 From: rushmorem Date: Wed, 13 Nov 2024 23:24:30 +0000 Subject: [PATCH 1/3] Upgrade `hashbrown` --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7c0ab4d..1e1c62e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ std = [] psl-types = "2.0.11" # Optional dependencies -hashbrown = { version = "0.12.3", features = ["inline-more"], optional = true } +hashbrown = { version = "0.15.1", features = ["inline-more"], optional = true } idna = { version = "1.0", optional = true } unicase = { version = "2.6.0", default-features = false, optional = true } diff --git a/src/lib.rs b/src/lib.rs index bd918e1..f6e3a01 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -105,7 +105,7 @@ impl List { #[cfg(feature = "anycase")] let key = UniCase::new(Cow::from(label.to_owned())); - current = current.children.entry(key).or_insert_with(Default::default); + current = current.children.entry(key).or_default(); } current.leaf = Some(Leaf { is_exception, typ }); From d894e8863ddc1542601f14d7b50decd012ecd5b4 Mon Sep 17 00:00:00 2001 From: rushmorem Date: Wed, 13 Nov 2024 23:31:17 +0000 Subject: [PATCH 2/3] Drop obsolete dev dependency --- Cargo.toml | 1 - tests/list.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1e1c62e..1aa0140 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,6 @@ idna = { version = "1.0", optional = true } unicase = { version = "2.6.0", default-features = false, optional = true } [dev-dependencies] -lazy_static = "1.4.0" rspec = "1.0.0" [package.metadata.docs.rs] diff --git a/tests/list.rs b/tests/list.rs index dd6f359..9832777 100644 --- a/tests/list.rs +++ b/tests/list.rs @@ -1,10 +1,10 @@ use publicsuffix::{List, Psl, Type}; use rspec::report::ExampleResult; +use std::sync::LazyLock; use std::{env, mem, str}; -lazy_static::lazy_static! { - static ref LIST: List = include_str!("public_suffix_list.dat").parse().unwrap(); -} +static LIST: LazyLock = + LazyLock::new(|| include_str!("public_suffix_list.dat").parse().unwrap()); #[test] fn list_behaviour() { From e36de000c7683e87fd76f796bf38dd8fc403012a Mon Sep 17 00:00:00 2001 From: rushmorem Date: Wed, 13 Nov 2024 23:50:05 +0000 Subject: [PATCH 3/3] Bump MSRV to v1.68.2 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 061ad11..8db032b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: check: - name: Check on v1.56 + name: Check on v1.68.2 runs-on: ubuntu-latest steps: - name: Checkout sources @@ -13,7 +13,7 @@ jobs: - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: - toolchain: 1.56.1 + toolchain: 1.68.2 override: true - name: Run cargo check