mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-17 06:51:24 +00:00
Run cargo fmt
over all code
This commit is contained in:
@ -627,14 +627,10 @@ impl<'a> Context<'a> {
|
||||
// Make sure to export the `anyref` table for the JS bindings since it
|
||||
// will need to be initialized. If it doesn't exist though then the
|
||||
// module must not use it, so we skip it.
|
||||
let table = self
|
||||
.module
|
||||
.tables
|
||||
.iter()
|
||||
.find(|t| match t.kind {
|
||||
walrus::TableKind::Anyref(_) => true,
|
||||
_ => false,
|
||||
});
|
||||
let table = self.module.tables.iter().find(|t| match t.kind {
|
||||
walrus::TableKind::Anyref(_) => true,
|
||||
_ => false,
|
||||
});
|
||||
let table = match table {
|
||||
Some(t) => t.id(),
|
||||
None => return Ok(()),
|
||||
@ -642,11 +638,9 @@ impl<'a> Context<'a> {
|
||||
self.module.exports.add("__wbg_anyref_table", table);
|
||||
|
||||
let ty = self.module.types.add(&[], &[]);
|
||||
let (import, import_id) = self.module.add_import_func(
|
||||
PLACEHOLDER_MODULE,
|
||||
"__wbindgen_init_anyref_table",
|
||||
ty,
|
||||
);
|
||||
let (import, import_id) =
|
||||
self.module
|
||||
.add_import_func(PLACEHOLDER_MODULE, "__wbindgen_init_anyref_table", ty);
|
||||
|
||||
self.module.start = Some(match self.module.start {
|
||||
Some(prev_start) => {
|
||||
|
Reference in New Issue
Block a user