diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-11-10 13:14:44 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-11-10 13:14:44 -0500 |
commit | 747da41fd3f192038c2e3194b4de041f7969f7a8 (patch) | |
tree | 5436c8b77a9bfcbefc90885513ea4ed0ec5b5d51 /src/util.rs | |
parent | 847f8834ae051c1c6177e9166cac855ccff113f0 (diff) | |
download | nbsh-747da41fd3f192038c2e3194b4de041f7969f7a8.tar.gz nbsh-747da41fd3f192038c2e3194b4de041f7969f7a8.zip |
simplify
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs new file mode 100644 index 0000000..d792b91 --- /dev/null +++ b/src/util.rs @@ -0,0 +1,5 @@ +pub type Mutex<T> = async_std::sync::Arc<async_std::sync::Mutex<T>>; + +pub fn mutex<T>(t: T) -> Mutex<T> { + async_std::sync::Arc::new(async_std::sync::Mutex::new(t)) +} |