From e9fee99773ce2ef92d59b7ee83943f69a30b33ea Mon Sep 17 00:00:00 2001 From: ikopylov Date: Fri, 22 Sep 2023 16:50:55 +0200 Subject: [PATCH] 278 update crates versions (#291) * [278] Update crate versions * [278] Update CHANGELOG.md * [278] Use std:sync::OnceLock instead of OnceCell --- CHANGELOG.md | 2 +- Cargo.toml | 11 +++++------ src/filter/bloom.rs | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 718a902cea..6065d76b67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ Pearl changelog - Only add a deletion record in old blobs if the key is present (#284) #### Updated - +- Update `tokio`, `bytes`, `async-lock` and `nix` crate versions (#278) ## [0.19.0] - 2023-05-15 diff --git a/Cargo.toml b/Cargo.toml index 16adc2eb52..c9a0eb0dc9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,18 +42,17 @@ serde = "1.0" serde_derive = "1.0" thiserror = "1.0" tokio-stream = "0.1" -nix = "0.25.0" +nix = { version = "0.26", default_features = false, features = ["fs"] } libc = "0.2" -static_assertions = "1.1.0" -bytes = "1.2" -async-lock = "2.6" -once_cell = "1.17" +static_assertions = "1.1" +bytes = "1.4" +async-lock = "2.7" # Benchmark only dependencies clap = { version = "3.2", optional = true } env_logger = { version = "0.9", optional = true } [dependencies.tokio] -version = "1.21" +version = "1.28" features = ["fs", "io-util", "sync", "time", "rt", "macros", "rt-multi-thread"] [features] diff --git a/src/filter/bloom.rs b/src/filter/bloom.rs index d481b509bd..f00d06adf4 100644 --- a/src/filter/bloom.rs +++ b/src/filter/bloom.rs @@ -3,7 +3,7 @@ use ahash::AHasher; use atomic_bitvec::*; use std::hash::Hasher; use std::sync::RwLock; -use once_cell::sync::OnceCell; +use std::sync::OnceLock; // All usizes in structures are serialized as u64 in binary /// Bloom filter @@ -149,7 +149,7 @@ impl Config { /// Returns single shared instance of [`Config`] if the current is equal to it, /// otherwise just wraps `Self` with `Arc` pub(crate) fn make_shared(self) -> Arc { - static SHARED_INSTANCE: OnceCell> = OnceCell::new(); + static SHARED_INSTANCE: OnceLock> = OnceLock::new(); let local_instance = SHARED_INSTANCE.get_or_init(|| Arc::new(self.clone())); if self == **local_instance {