Skip to content

Commit 649132f

Browse files
committed
opti(semaphore): make new a const fn
1 parent 9c34aa4 commit 649132f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

async-semaphore/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl Semaphore {
2727
///
2828
/// let s = Semaphore::new(5);
2929
/// ```
30-
pub fn new(n: usize) -> Semaphore {
30+
pub const fn new(n: usize) -> Semaphore {
3131
Semaphore {
3232
count: AtomicUsize::new(n),
3333
event: Event::new(),

0 commit comments

Comments
 (0)