diff options
author | Taiki Endo <te316e89@gmail.com> | 2020-10-13 06:13:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 14:13:23 -0700 |
commit | c90681bd8e629b5fde988b9f5be7b915e5cf8ae5 (patch) | |
tree | e70838b9437123dc986ebcfeb8fc0c44ca3fe667 /tokio/src/time | |
parent | 24d0a0cfa8916eaef17f40f044d978aa3904d654 (diff) |
rt: simplify rt-* features (#2949)
tokio:
merge rt-core and rt-util as rt
rename rt-threaded to rt-multi-thread
tokio-util:
rename rt-core to rt
Closes #2942
Diffstat (limited to 'tokio/src/time')
-rw-r--r-- | tokio/src/time/clock.rs | 6 | ||||
-rw-r--r-- | tokio/src/time/driver/handle.rs | 6 | ||||
-rw-r--r-- | tokio/src/time/driver/mod.rs | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tokio/src/time/clock.rs b/tokio/src/time/clock.rs index c35fc7b3..fab7ecaf 100644 --- a/tokio/src/time/clock.rs +++ b/tokio/src/time/clock.rs @@ -1,4 +1,4 @@ -#![cfg_attr(not(feature = "rt-core"), allow(dead_code))] +#![cfg_attr(not(feature = "rt"), allow(dead_code))] //! Source of time abstraction. //! @@ -39,13 +39,13 @@ cfg_test_util! { use crate::time::{Duration, Instant}; use std::sync::{Arc, Mutex}; - cfg_rt_core! { + cfg_rt! { fn clock() -> Option<Clock> { crate::runtime::context::clock() } } - cfg_not_rt_core! { + cfg_not_rt! { fn clock() -> Option<Clock> { None } diff --git a/tokio/src/time/driver/handle.rs b/tokio/src/time/driver/handle.rs index 93d8cd7b..54b8a8bd 100644 --- a/tokio/src/time/driver/handle.rs +++ b/tokio/src/time/driver/handle.rs @@ -20,7 +20,7 @@ impl Handle { } } -cfg_rt_core! { +cfg_rt! { impl Handle { /// Tries to get a handle to the current timer. /// @@ -45,7 +45,7 @@ cfg_rt_core! { } } -cfg_not_rt_core! { +cfg_not_rt! { impl Handle { /// Tries to get a handle to the current timer. /// @@ -65,7 +65,7 @@ cfg_not_rt_core! { /// panicking. pub(crate) fn current() -> Self { panic!("there is no timer running, must be called from the context of Tokio runtime or \ - `rt-core` is not enabled") + `rt` is not enabled") } } } diff --git a/tokio/src/time/driver/mod.rs b/tokio/src/time/driver/mod.rs index d2e58954..8532c551 100644 --- a/tokio/src/time/driver/mod.rs +++ b/tokio/src/time/driver/mod.rs @@ -1,4 +1,4 @@ -#![cfg_attr(not(feature = "rt-core"), allow(dead_code))] +#![cfg_attr(not(feature = "rt"), allow(dead_code))] //! Time driver |