diff --git a/.github/workflows/deadpool.yml b/.github/workflows/deadpool.yml index baaafcec..cc1b7b31 100644 --- a/.github/workflows/deadpool.yml +++ b/.github/workflows/deadpool.yml @@ -46,8 +46,8 @@ jobs: - uses: dtolnay/rust-toolchain@v1 with: components: rustc,rust-std,cargo - toolchain: "1.75" - - run: ../../tools/cargo-update-minimal-versions.sh 1.75 + toolchain: "1.80" + - run: ../../tools/cargo-update-minimal-versions.sh 1.80 - run: cargo check --all-features rustdoc: name: Doc diff --git a/crates/deadpool/CHANGELOG.md b/crates/deadpool/CHANGELOG.md index 3f6006d3..6e21f966 100644 --- a/crates/deadpool/CHANGELOG.md +++ b/crates/deadpool/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [Unreleased] + +- Remove lazy_static dependency +- Bump up MSRV to `1.80` + ## [0.12.3] - 2025-08-19 - Add unique `id` to objects which can be read via the `Object::id` method diff --git a/crates/deadpool/Cargo.toml b/crates/deadpool/Cargo.toml index 3af93d60..8e05e46f 100644 --- a/crates/deadpool/Cargo.toml +++ b/crates/deadpool/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "deadpool" -version = "0.12.3" +version = "0.12.4" edition = "2021" -rust-version = "1.75" +rust-version = "1.80" authors = ["Michael P. Jung "] description = "Dead simple async pool" keywords = ["async", "database", "pool"] @@ -22,7 +22,6 @@ rt_tokio_1 = ["deadpool-runtime/tokio_1"] rt_async-std_1 = ["deadpool-runtime/async-std_1"] [dependencies] -lazy_static = "1.5.0" num_cpus = "1.11.1" # `serde` feature serde = { version = "1.0.103", features = ["derive"], optional = true } @@ -36,7 +35,7 @@ tokio = { version = "1.5", features = ["sync"] } [dev-dependencies] async-std = { version = "1.0", features = ["attributes"] } config = { version = "0.15", features = ["json"] } -criterion = { version = "0.5", features = ["html_reports", "async_tokio"] } +criterion = { version = "0.7", features = ["html_reports", "async_tokio"] } itertools = "0.14" tokio = { version = "1.5.0", features = [ "macros", diff --git a/crates/deadpool/src/util.rs b/crates/deadpool/src/util.rs index 533b9114..bd2000b1 100644 --- a/crates/deadpool/src/util.rs +++ b/crates/deadpool/src/util.rs @@ -1,9 +1,9 @@ -lazy_static::lazy_static! { - /// Cache the physical CPU count to avoid calling `num_cpus::get()` - /// multiple times, which is expensive when creating pools in quick - /// succession. - static ref CPU_COUNT: usize = num_cpus::get(); -} +use std::sync::LazyLock; + +/// Cache the physical CPU cofunt to avoid calling `num_cpus::get()` +/// multiple times, which is expensive when creating pools in quick +/// succession. +static CPU_COUNT: LazyLock = LazyLock::new(num_cpus::get); /// Get the default maximum size of a pool, which is `cpu_core_count * 2` /// including logical cores (Hyper-Threading).