Skip to content

Commit c4db0bf

Browse files
committed
opti(barrier): make new a const fn
1 parent 649132f commit c4db0bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

async-barrier/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ categories = ["asynchronous", "concurrency"]
1313
readme = "../README.md"
1414

1515
[dependencies]
16-
async-mutex = "1.1.5"
16+
async-mutex = { path = "../async-mutex", version = "1.4.0" }
1717
event-listener = "2.4.0"
1818

1919
[dev-dependencies]

async-barrier/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl Barrier {
3737
///
3838
/// let barrier = Barrier::new(5);
3939
/// ```
40-
pub fn new(n: usize) -> Barrier {
40+
pub const fn new(n: usize) -> Barrier {
4141
Barrier {
4242
n,
4343
state: Mutex::new(State {

0 commit comments

Comments
 (0)