summaryrefslogtreecommitdiffstats
path: root/tokio/src/io/driver
diff options
context:
space:
mode:
authorAvery Harnish <EverlastingBugstopper@users.noreply.github.com>2020-01-24 17:10:12 -0600
committerCarl Lerche <me@carllerche.com>2020-01-24 15:10:11 -0800
commit9eca96aa214cb8e2fd695cbed179f93826b3ef46 (patch)
tree4031da77db0864303e3b9887b7507d705a24e85c /tokio/src/io/driver
parenta16c9a5a018af21ce48895207564a74c7feacc8b (diff)
rt: improve "no runtime" panic messages (#2145)
Diffstat (limited to 'tokio/src/io/driver')
-rw-r--r--tokio/src/io/driver/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tokio/src/io/driver/mod.rs b/tokio/src/io/driver/mod.rs
index fb3104f1..8385448c 100644
--- a/tokio/src/io/driver/mod.rs
+++ b/tokio/src/io/driver/mod.rs
@@ -198,7 +198,8 @@ impl Handle {
///
/// This function panics if there is no current reactor set.
pub(super) fn current() -> Self {
- context::io_handle().expect("no current reactor")
+ context::io_handle()
+ .expect("there is no reactor running, must be called from the context of Tokio runtime")
}
/// Forces a reactor blocked in a call to `turn` to wakeup, or otherwise