Commit d4b7f37 1 parent 9af40bb commit d4b7f37 Copy full SHA for d4b7f37
File tree 1 file changed +1
-10
lines changed
1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -324,8 +324,6 @@ fn generate_code(
324
324
quote ! {
325
325
use rust_i18n:: { BackendExt , CowStr , MinifyKey } ;
326
326
use std:: borrow:: Cow ;
327
- use std:: sync:: Mutex ;
328
- use rust_i18n:: once_cell:: sync:: Lazy ;
329
327
330
328
/// I18n backend instance
331
329
///
@@ -335,18 +333,11 @@ fn generate_code(
335
333
let mut backend = rust_i18n:: SimpleBackend :: new( ) ;
336
334
#( #all_translations) *
337
335
#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
343
337
344
338
Box :: new( backend)
345
339
} ) ;
346
340
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
-
350
341
static _RUST_I18N_FALLBACK_LOCALE: Option <& [ & ' static str ] > = #fallback;
351
342
static _RUST_I18N_MINIFY_KEY: bool = #minify_key;
352
343
static _RUST_I18N_MINIFY_KEY_LEN: usize = #minify_key_len;
You can’t perform that action at this time.
0 commit comments