diff --git a/src/wasm.rs b/src/wasm.rs index 930cfe6..ed175d8 100644 --- a/src/wasm.rs +++ b/src/wasm.rs @@ -48,10 +48,10 @@ impl Client { pub fn try_acquire(&self) -> io::Result> { let mut lock = self.inner.count.lock().unwrap_or_else(|e| e.into_inner()); if *lock == 0 { - None + Ok(None) } else { *lock -= 1; - Ok(Acquired(())) + Ok(Some(Acquired(()))) } }