diff options
Diffstat (limited to 'src/utils/variables.rs')
| -rw-r--r-- | src/utils/variables.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/variables.rs b/src/utils/variables.rs index 91c9912..bfec4ca 100644 --- a/src/utils/variables.rs +++ b/src/utils/variables.rs @@ -1,9 +1,8 @@ use super::*; use fancy_regex::{Captures, Regex}; +use std::sync::LazyLock; -lazy_static::lazy_static! { - pub static ref RE_VARIABLE: Regex = Regex::new(r"\{\{(\w+)\}\}").unwrap(); -} +pub static RE_VARIABLE: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"\{\{(\w+)\}\}").unwrap()); pub fn interpolate_variables(text: &mut String) { *text = RE_VARIABLE .replace_all(text, |caps: &Captures<'_>| { |
