Skip to content

Commit 1c52fb1

Browse files
committed
Remove leading and trailing blanks from the --no-modules output
The output using modules already uses string formatting that carefully avoids emitting leading and trailing blanks; adjust the --no-modules output to match.
1 parent 05a0a5c commit 1c52fb1

File tree

1 file changed

+2
-3
lines changed
  • crates/cli-support/src/js

1 file changed

+2
-3
lines changed

crates/cli-support/src/js/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<'a> Context<'a> {
417417

418418
let mut js = if self.config.no_modules {
419419
format!(
420-
"
420+
"\
421421
(function() {{
422422
var wasm;
423423
const __exports = {{}};
@@ -438,8 +438,7 @@ impl<'a> Context<'a> {
438438
}});
439439
}};
440440
self.{global_name} = Object.assign(init, __exports);
441-
}})();
442-
",
441+
}})();",
443442
globals = self.globals,
444443
module = module_name,
445444
global_name = self.config.no_modules_global

0 commit comments

Comments
 (0)