Skip to content

Commit 7e2e660

Browse files
committed
clippy: large size difference between variants
1 parent 5a1678e commit 7e2e660

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

crates/backend/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct Import {
3939

4040
#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))]
4141
pub enum ImportKind {
42-
Function(ImportFunction),
42+
Function(Box<ImportFunction>),
4343
Static(ImportStatic),
4444
Type(ImportType),
4545
Enum(ImportEnum),

crates/backend/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ pub fn wrap_import_function(function: ast::ImportFunction) -> ast::Import {
8585
module: None,
8686
version: None,
8787
js_namespace: None,
88-
kind: ast::ImportKind::Function(function),
88+
kind: ast::ImportKind::Function(Box::new(function)),
8989
}
9090
}

crates/macro/src/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,15 @@ impl ConvertToAst<BindgenAttrs> for syn::ForeignItemFn {
432432
};
433433
format!("__wbg_f_{}_{}_{}", js_name, self.ident, ns)
434434
};
435-
ast::ImportKind::Function(ast::ImportFunction {
435+
ast::ImportKind::Function(Box::new(ast::ImportFunction {
436436
function: wasm,
437437
kind,
438438
js_ret,
439439
catch,
440440
structural: opts.structural(),
441441
rust_name: self.ident.clone(),
442442
shim: Ident::new(&shim, Span::call_site()),
443-
})
443+
}))
444444
}
445445
}
446446

0 commit comments

Comments
 (0)