mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-25 06:02:13 +00:00
Running rustfmt
This commit is contained in:
parent
d193b2db8f
commit
b99ab10696
@ -461,7 +461,11 @@ impl<'a> Context<'a> {
|
|||||||
Ok(imports)
|
Ok(imports)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ts_for_init_fn(&self, has_memory: bool, has_module_or_path_optional: bool) -> Result<String, Error> {
|
fn ts_for_init_fn(
|
||||||
|
&self,
|
||||||
|
has_memory: bool,
|
||||||
|
has_module_or_path_optional: bool,
|
||||||
|
) -> Result<String, Error> {
|
||||||
let output = crate::wasm2es6js::interface(&self.module)?;
|
let output = crate::wasm2es6js::interface(&self.module)?;
|
||||||
|
|
||||||
let (memory_doc, memory_param) = if has_memory {
|
let (memory_doc, memory_param) = if has_memory {
|
||||||
|
@ -51,17 +51,11 @@ pub fn interface(module: &Module) -> Result<String, Error> {
|
|||||||
let id = match entry.item {
|
let id = match entry.item {
|
||||||
walrus::ExportItem::Function(i) => i,
|
walrus::ExportItem::Function(i) => i,
|
||||||
walrus::ExportItem::Memory(_) => {
|
walrus::ExportItem::Memory(_) => {
|
||||||
exports.push_str(&format!(
|
exports.push_str(&format!(" readonly {}: WebAssembly.Memory;\n", entry.name,));
|
||||||
" readonly {}: WebAssembly.Memory;\n",
|
|
||||||
entry.name,
|
|
||||||
));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
walrus::ExportItem::Table(_) => {
|
walrus::ExportItem::Table(_) => {
|
||||||
exports.push_str(&format!(
|
exports.push_str(&format!(" readonly {}: WebAssembly.Table;\n", entry.name,));
|
||||||
" readonly {}: WebAssembly.Table;\n",
|
|
||||||
entry.name,
|
|
||||||
));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
walrus::ExportItem::Global(_) => continue,
|
walrus::ExportItem::Global(_) => continue,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user