Skip to content

Commit d4b7f37

Browse files
committed
Revert #90
1 parent 9af40bb commit d4b7f37

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

crates/macro/src/lib.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ fn generate_code(
324324
quote! {
325325
use rust_i18n::{BackendExt, CowStr, MinifyKey};
326326
use std::borrow::Cow;
327-
use std::sync::Mutex;
328-
use rust_i18n::once_cell::sync::Lazy;
329327

330328
/// I18n backend instance
331329
///
@@ -335,18 +333,11 @@ fn generate_code(
335333
let mut backend = rust_i18n::SimpleBackend::new();
336334
#(#all_translations)*
337335
#extend_code
338-
339-
if *_RUST_I18N_INITIALIZED_DEFAULT_LOCALE.lock().unwrap() == false {
340-
*_RUST_I18N_INITIALIZED_DEFAULT_LOCALE.lock().unwrap() = true;
341-
#default_locale
342-
}
336+
#default_locale
343337

344338
Box::new(backend)
345339
});
346340

347-
/// To mark the default locale has been initialized
348-
static _RUST_I18N_INITIALIZED_DEFAULT_LOCALE: Lazy<Mutex<bool>> = Lazy::new(|| Mutex::new(false));
349-
350341
static _RUST_I18N_FALLBACK_LOCALE: Option<&[&'static str]> = #fallback;
351342
static _RUST_I18N_MINIFY_KEY: bool = #minify_key;
352343
static _RUST_I18N_MINIFY_KEY_LEN: usize = #minify_key_len;

0 commit comments

Comments
 (0)