sync: make TryAcquireError public (#3250)

The [`Semaphore::try_acquire`][1] method currently returns a private error type.

[1]: https://docs.rs/tokio/0.3/tokio/sync/struct.Semaphore.html#method.try_acquire
This commit is contained in:
Alice Ryhl
2020-12-10 19:56:05 -08:00
committed by GitHub
parent 16c2e0983c
commit 69e62ef89e
+1 -1
View File
@@ -444,7 +444,7 @@ cfg_sync! {
pub(crate) mod batch_semaphore;
mod semaphore;
pub use semaphore::{Semaphore, SemaphorePermit, OwnedSemaphorePermit};
pub use semaphore::{Semaphore, SemaphorePermit, OwnedSemaphorePermit, TryAcquireError};
mod rwlock;
pub use rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};