mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 14:31:22 +00:00
Run cargo fmt
over all code
This commit is contained in:
@ -148,7 +148,10 @@ impl<'a, 'b> Outgoing<'a, 'b> {
|
||||
|
||||
self.cx.expose_get_cached_string_from_wasm()?;
|
||||
|
||||
self.js.prelude(&format!("const v{} = getCachedStringFromWasm({}, {});", tmp, ptr, len));
|
||||
self.js.prelude(&format!(
|
||||
"const v{} = getCachedStringFromWasm({}, {});",
|
||||
tmp, ptr, len
|
||||
));
|
||||
|
||||
if *owned {
|
||||
self.prelude_free_cached_string(&ptr, &len)?;
|
||||
|
@ -287,7 +287,8 @@ impl Bindgen {
|
||||
);
|
||||
}
|
||||
|
||||
self.threads.run(&mut module)
|
||||
self.threads
|
||||
.run(&mut module)
|
||||
.with_context(|_| "failed to prepare module for threading")?;
|
||||
|
||||
// If requested, turn all mangled symbols into prettier unmangled
|
||||
|
@ -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