summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlice Ryhl <alice@ryhl.io>2020-12-11 04:56:05 +0100
committerGitHub <noreply@github.com>2020-12-10 19:56:05 -0800
commit69e62ef89e481e0fb29ce3ef4ddce1eea4114000 (patch)
tree0784747565f6583a726c85dfedcd0527d8373cc6
parent16c2e0983cc0ab22f9a0b7a1ac37ea32a42b9a6e (diff)
downloadtokio-69e62ef89e481e0fb29ce3ef4ddce1eea4114000.tar.gz
tokio-69e62ef89e481e0fb29ce3ef4ddce1eea4114000.tar.xz
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
-rw-r--r--tokio/src/sync/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tokio/src/sync/mod.rs b/tokio/src/sync/mod.rs
index 57ae2778..d88bf9d6 100644
--- a/tokio/src/sync/mod.rs
+++ b/tokio/src/sync/mod.rs
@@ -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};