Skip to content

Commit

Permalink
Update Loom and make it a dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
sbarral committed Sep 8, 2024
1 parent 08fa3e4 commit a86347e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ keywords = ["async", "channel", "oneshot", "reusable", "futures"]
[dev-dependencies]
pollster = "0.3"

[target.'cfg(multishot_loom)'.dependencies]
loom = "0.5"
[target.'cfg(multishot_loom)'.dev-dependencies]
loom = "0.7"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(multishot_loom)'] }
8 changes: 4 additions & 4 deletions src/loom_exports.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#[cfg(multishot_loom)]
#[cfg(all(test, multishot_loom))]
pub(crate) mod sync {
pub(crate) mod atomic {
pub(crate) use loom::sync::atomic::AtomicUsize;
}
}
#[cfg(not(multishot_loom))]
#[cfg(not(all(test, multishot_loom)))]
pub(crate) mod sync {
pub(crate) mod atomic {
pub(crate) use std::sync::atomic::AtomicUsize;
}
}

#[cfg(multishot_loom)]
#[cfg(all(test, multishot_loom))]
pub(crate) mod cell {
pub(crate) use loom::cell::UnsafeCell;
}
#[cfg(not(multishot_loom))]
#[cfg(not(all(test, multishot_loom)))]
pub(crate) mod cell {
#[derive(Debug)]
pub(crate) struct UnsafeCell<T>(std::cell::UnsafeCell<T>);
Expand Down

0 comments on commit a86347e

Please sign in to comment.