summaryrefslogtreecommitdiffstats
path: root/tokio/src/time/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/time/driver
parenta16c9a5a018af21ce48895207564a74c7feacc8b (diff)
rt: improve "no runtime" panic messages (#2145)
Diffstat (limited to 'tokio/src/time/driver')
-rw-r--r--tokio/src/time/driver/handle.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tokio/src/time/driver/handle.rs b/tokio/src/time/driver/handle.rs
index 3a424800..38b1761c 100644
--- a/tokio/src/time/driver/handle.rs
+++ b/tokio/src/time/driver/handle.rs
@@ -21,7 +21,8 @@ impl Handle {
///
/// This function panics if there is no current timer set.
pub(crate) fn current() -> Self {
- context::time_handle().expect("no current timer")
+ context::time_handle()
+ .expect("there is no timer running, must be called from the context of Tokio runtime")
}
/// Tries to return a strong ref to the inner