@@ -987,11 +987,7 @@ __wbg_set_wasm(wasm);"
987
987
}
988
988
989
989
let js = match & self . config . mode {
990
- OutputMode :: Emscripten => format ! (
991
- "\
992
- {imports_init}",
993
- imports_init = imports_init
994
- ) ,
990
+ OutputMode :: Emscripten => imports_init. to_string ( ) ,
995
991
_ => format ! (
996
992
"\
997
993
async function __wbg_load(module, imports) {{
@@ -2654,15 +2650,15 @@ __wbg_set_wasm(wasm);"
2654
2650
}
2655
2651
let table = self . export_function_table ( ) ?;
2656
2652
if matches ! ( self . config. mode, OutputMode :: Emscripten ) {
2657
- self . emscripten_library . push_str ( & format ! (
2653
+ self . emscripten_library . push_str (
2658
2654
"
2659
2655
$CLOSURE_DTORS: `(typeof FinalizationRegistry === 'undefined')
2660
2656
? {{ register: () => {{}}, unregister: () => {{}} }}
2661
2657
: new FinalizationRegistry(state => {{
2662
2658
wasmExports.__indirect_function_table.get(state.dtor)(state.a, state.b)
2663
2659
}})`,\n
2664
- "
2665
- ) ) ;
2660
+ " ,
2661
+ ) ;
2666
2662
} else {
2667
2663
self . global ( & format ! (
2668
2664
"
@@ -3187,20 +3183,20 @@ __wbg_set_wasm(wasm);"
3187
3183
"function() {{ return logError(function {}, arguments) }}" ,
3188
3184
code
3189
3185
)
3190
- } else {
3191
- if !import_deps. is_empty ( ) {
3192
- for dep in & import_deps {
3193
- self . emscripten_deps . insert ( dep. clone ( ) ) ;
3194
- }
3195
- format ! (
3196
- "function{},\n {}__deps: [{}]" ,
3197
- code,
3198
- self . module. imports. get( core) . name,
3199
- import_deps. join( "," )
3200
- )
3201
- } else {
3202
- format ! ( "function{}\n " , code)
3186
+ } else if ( matches ! ( self . config. mode, OutputMode :: Emscripten )
3187
+ && !import_deps. is_empty ( ) )
3188
+ {
3189
+ for dep in & import_deps {
3190
+ self . emscripten_deps . insert ( dep. clone ( ) ) ;
3203
3191
}
3192
+ format ! (
3193
+ "function{},\n {}__deps: [{}]" ,
3194
+ code,
3195
+ self . module. imports. get( core) . name,
3196
+ import_deps. join( "," )
3197
+ )
3198
+ } else {
3199
+ format ! ( "function{}\n " , code)
3204
3200
} ;
3205
3201
3206
3202
self . wasm_import_definitions . insert ( core, code) ;
@@ -3210,7 +3206,7 @@ __wbg_set_wasm(wasm);"
3210
3206
assert ! ( !log_error) ;
3211
3207
3212
3208
if matches ! ( self . config. mode, OutputMode :: Emscripten ) {
3213
- self . emscripten_library . push_str ( "$" ) ;
3209
+ self . emscripten_library . push ( '$' ) ;
3214
3210
self . emscripten_library . push_str ( & self . adapter_name ( id) ) ;
3215
3211
self . emscripten_library . push_str ( ": function" ) ;
3216
3212
self . emscripten_library
0 commit comments