Run cargo fmt over all code

This commit is contained in:
Alex Crichton
2019-08-12 11:28:37 -07:00
parent 3697fb7205
commit 1d0c333a2b
9 changed files with 21 additions and 25 deletions

View File

@ -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)?;

View File

@ -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

View File

@ -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) => {