diff options
Diffstat (limited to 'components/config_plugins')
-rw-r--r-- | components/config_plugins/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/config_plugins/lib.rs b/components/config_plugins/lib.rs index 7e7badc3d2d..d419310dd84 100644 --- a/components/config_plugins/lib.rs +++ b/components/config_plugins/lib.rs @@ -108,13 +108,12 @@ impl Build { let num_prefs = self.path_map.len(); self.output.extend(quote! { - lazy_static::lazy_static! { - pub static ref #gen_accessors: std::collections::HashMap<String, #accessor_type> = { + pub static #gen_accessors: std::sync::LazyLock<std::collections::HashMap<String, #accessor_type>> = + std::sync::LazyLock::new(|| { let mut map = std::collections::HashMap::with_capacity(#num_prefs); #(#values)* map - }; - } + }); }); } |