Skip to content

Commit

Permalink
use re-exported tokio in macro
Browse files Browse the repository at this point in the history
  • Loading branch information
4t145 committed Oct 17, 2023
1 parent 6b2b8db commit 63d880c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tardis/src/utils/tardis_static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63d880c

Please sign in to comment.