From 63d880c97105938c25414d5b93f12b55e033e2d6 Mon Sep 17 00:00:00 2001 From: 4t145 Date: Tue, 17 Oct 2023 18:04:26 +0800 Subject: [PATCH] use re-exported tokio in macro --- tardis/src/utils/tardis_static.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tardis/src/utils/tardis_static.rs b/tardis/src/utils/tardis_static.rs index 7671f1af..d40d254a 100644 --- a/tardis/src/utils/tardis_static.rs +++ b/tardis/src/utils/tardis_static.rs @@ -33,7 +33,7 @@ macro_rules! tardis_static { ($(#[$attr:meta])* $vis:vis async $ident:ident :$Type:ty = $init: expr; $($rest: tt)*) => { $(#[$attr])* $vis async fn $ident() -> &'static $Type { - use tokio::sync::OnceCell; + use $crate::tokio::sync::OnceCell; static STATIC_VAL: OnceCell<$Type> = OnceCell::const_new(); STATIC_VAL.get_or_init(|| $init).await