Skip to content

Commit 7b96b41

Browse files
authored
fix try_acquire for wasm target (#84)
1 parent 4ac8212 commit 7b96b41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wasm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ impl Client {
4848
pub fn try_acquire(&self) -> io::Result<Option<Acquired>> {
4949
let mut lock = self.inner.count.lock().unwrap_or_else(|e| e.into_inner());
5050
if *lock == 0 {
51-
None
51+
Ok(None)
5252
} else {
5353
*lock -= 1;
54-
Ok(Acquired(()))
54+
Ok(Some(Acquired(())))
5555
}
5656
}
5757

0 commit comments

Comments
 (0)