Compare commits

...

4 Commits

Author SHA1 Message Date
John Nunley f2a37b313e
Merge 7f219713c6 into 47dd439e5a 2024-02-11 00:33:52 +00:00
John Nunley 7f219713c6
chore: ignore that test for now
Signed-off-by: John Nunley <dev@notgull.net>
2024-02-10 16:33:42 -08:00
John Nunley 50ccff79c1
chore: Review comments and clippy
Signed-off-by: John Nunley <dev@notgull.net>
2024-02-10 09:57:58 -08:00
John Nunley db0742bd8f
chore: Bump to released event-listener
Signed-off-by: John Nunley <dev@notgull.net>
2024-02-10 09:55:26 -08:00
3 changed files with 7 additions and 8 deletions

View File

@ -5,8 +5,8 @@ name = "async-lock"
# - Create "v3.x.y" git tag
version = "3.3.0"
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
edition = "2018"
rust-version = "1.61"
edition = "2021"
rust-version = "1.60"
description = "Async synchronization primitives"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/smol-rs/async-lock"
@ -24,13 +24,10 @@ default = ["std"]
std = ["event-listener/std", "event-listener-strategy/std"]
[dev-dependencies]
async-channel = "2.1.1"
async-channel = "2.2.0"
fastrand = "2.0.0"
futures-lite = "2.0.0"
waker-fn = "1.1.0"
[target.'cfg(target_family = "wasm")'.dev-dependencies]
wasm-bindgen-test = "0.3"
[patch.crates-io]
async-channel = { git = "https://github.com/smol-rs/async-channel.git", branch = "notgull/evl5" }

View File

@ -502,10 +502,11 @@ impl<T> OnceCell<T> {
/// ```
#[cfg(all(feature = "std", not(target_family = "wasm")))]
pub fn get_or_init_blocking(&self, closure: impl FnOnce() -> T + Unpin) -> &T {
match self.get_or_try_init_blocking(move || {
let result = self.get_or_try_init_blocking(move || {
let result: Result<T, Infallible> = Ok(closure());
result
}) {
});
match result {
Ok(value) => value,
Err(infallible) => match infallible {},
}

View File

@ -47,6 +47,7 @@ fn smoke() {
#[cfg(all(feature = "std", not(target_family = "wasm")))]
#[test]
#[cfg_attr(miri, ignore)]
fn smoke_blocking() {
future::block_on(async move {
const N: usize = 10;