diff options
author | Haibo Huang <hhb@google.com> | 2021-03-05 09:35:44 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-03-05 09:35:44 +0000 |
commit | e29ba45f952a1c193d6091f8aead991e88882126 (patch) | |
tree | 16d053e70d21e456d52f4a7762ee41441342b7a2 /src/time/driver/handle.rs | |
parent | 925d648e545e70d6a4faae3d7efe5e0de885f922 (diff) | |
parent | e3d8d80d2d8744ccdcd175323e0864c8f30fcedc (diff) | |
download | tokio-e29ba45f952a1c193d6091f8aead991e88882126.tar.gz |
Upgrade rust/crates/tokio to 1.2.0 am: e3d8d80d2d
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tokio/+/1582273
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I2d2cb9aba7b17be665909defd7673c645b22f2ab
Diffstat (limited to 'src/time/driver/handle.rs')
-rw-r--r-- | src/time/driver/handle.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/time/driver/handle.rs b/src/time/driver/handle.rs index bfc49fb..e934b56 100644 --- a/src/time/driver/handle.rs +++ b/src/time/driver/handle.rs @@ -47,7 +47,7 @@ cfg_rt! { /// panicking. pub(crate) fn current() -> Self { crate::runtime::context::time_handle() - .expect("there is no timer running, must be called from the context of Tokio runtime") + .expect("A Tokio 1.x context was found, but timers are disabled. Call `enable_time` on the runtime builder to enable timers.") } } } @@ -71,8 +71,7 @@ cfg_not_rt! { /// lazy, and so outside executed inside the runtime successfuly without /// panicking. pub(crate) fn current() -> Self { - panic!("there is no timer running, must be called from the context of Tokio runtime or \ - `rt` is not enabled") + panic!(crate::util::error::CONTEXT_MISSING_ERROR) } } } |