diff options
Diffstat (limited to 'tokio/src/park/thread.rs')
-rw-r--r-- | tokio/src/park/thread.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tokio/src/park/thread.rs b/tokio/src/park/thread.rs index 853d4d8a..12ef9717 100644 --- a/tokio/src/park/thread.rs +++ b/tokio/src/park/thread.rs @@ -10,13 +10,7 @@ pub(crate) struct ParkThread { inner: Arc<Inner>, } -/// Error returned by `ParkThread` -/// -/// This currently is never returned, but might at some point in the future. -#[derive(Debug)] -pub(crate) struct ParkError { - _p: (), -} +pub(crate) type ParkError = (); /// Unblocks a thread that was blocked by `ParkThread`. #[derive(Clone, Debug)] @@ -240,7 +234,7 @@ cfg_blocking_impl! { F: FnOnce(&ParkThread) -> R, { CURRENT_PARKER.try_with(|inner| f(inner)) - .map_err(|_| ParkError { _p: () }) + .map_err(|_| ()) } } |