Skip to content

Commit 9c34aa4

Browse files
committed
opti(mutex): make new a const fn
1 parent f768123 commit 9c34aa4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

async-mutex/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-mutex"
3-
version = "1.3.0"
3+
version = "1.4.0"
44
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
55
edition = "2018"
66
description = "Async mutex"

async-mutex/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl<T> Mutex<T> {
6262
///
6363
/// let mutex = Mutex::new(0);
6464
/// ```
65-
pub fn new(data: T) -> Mutex<T> {
65+
pub const fn new(data: T) -> Mutex<T> {
6666
Mutex {
6767
state: AtomicUsize::new(0),
6868
lock_ops: Event::new(),

0 commit comments

Comments
 (0)