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-11 04:56:05 +01:00 committed by GitHub
parent 16c2e0983c
commit 69e62ef89e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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};