Skip to content

Commit

Permalink
278 update crates versions (#291)
Browse files Browse the repository at this point in the history
* [278] Update crate versions

* [278] Update CHANGELOG.md

* [278] Use std:sync::OnceLock instead of OnceCell
  • Loading branch information
ikopylov authored Sep 22, 2023
1 parent 7a1a24f commit e9fee99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions src/filter/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<Self> {
static SHARED_INSTANCE: OnceCell<Arc<Config>> = OnceCell::new();
static SHARED_INSTANCE: OnceLock<Arc<Config>> = OnceLock::new();

let local_instance = SHARED_INSTANCE.get_or_init(|| Arc::new(self.clone()));
if self == **local_instance {
Expand Down

0 comments on commit e9fee99

Please sign in to comment.