forked from Orchid/orchid
10 lines
148 B
Rust
10 lines
148 B
Rust
#[macro_export]
|
|
macro_rules! tl_cache {
|
|
($ty:ty : $expr:expr) => {{
|
|
thread_local! {
|
|
static V: $ty = $expr;
|
|
}
|
|
V.with(|v| v.clone())
|
|
}};
|
|
}
|