@@ -203,7 +203,7 @@ fn shared_export<'a>(
203
203
intern : & ' a Interner ,
204
204
) -> Result < Export < ' a > , Diagnostic > {
205
205
let consumed = matches ! ( export. method_self, Some ( ast:: MethodSelf :: ByValue ) ) ;
206
- let method_kind = from_ast_method_kind ( & export. function , intern , & export . method_kind ) ?;
206
+ let method_kind = from_ast_method_kind ( & export. method_kind ) ?;
207
207
Ok ( Export {
208
208
class : export. js_class . as_deref ( ) ,
209
209
comments : export. comments . iter ( ) . map ( |s| & * * s) . collect ( ) ,
@@ -321,7 +321,7 @@ fn shared_import_function<'a>(
321
321
) -> Result < ImportFunction < ' a > , Diagnostic > {
322
322
let method = match & i. kind {
323
323
ast:: ImportFunctionKind :: Method { class, kind, .. } => {
324
- let kind = from_ast_method_kind ( & i . function , intern , kind) ?;
324
+ let kind = from_ast_method_kind ( kind) ?;
325
325
Some ( MethodData { class, kind } )
326
326
}
327
327
ast:: ImportFunctionKind :: Normal => None ,
@@ -584,28 +584,15 @@ macro_rules! encode_api {
584
584
}
585
585
wasm_bindgen_shared:: shared_api!( encode_api) ;
586
586
587
- fn from_ast_method_kind < ' a > (
588
- function : & ' a ast:: Function ,
589
- intern : & ' a Interner ,
590
- method_kind : & ' a ast:: MethodKind ,
591
- ) -> Result < MethodKind < ' a > , Diagnostic > {
587
+ fn from_ast_method_kind ( method_kind : & ast:: MethodKind ) -> Result < MethodKind , Diagnostic > {
592
588
Ok ( match method_kind {
593
589
ast:: MethodKind :: Constructor => MethodKind :: Constructor ,
594
590
ast:: MethodKind :: Operation ( ast:: Operation { is_static, kind } ) => {
595
591
let is_static = * is_static;
596
592
let kind = match kind {
597
- ast:: OperationKind :: Getter ( g) => {
598
- let g = g. as_ref ( ) . map ( |g| intern. intern_str ( g) ) ;
599
- OperationKind :: Getter ( g. unwrap_or_else ( || function. infer_getter_property ( ) ) )
600
- }
601
593
ast:: OperationKind :: Regular => OperationKind :: Regular ,
602
- ast:: OperationKind :: Setter ( s) => {
603
- let s = s. as_ref ( ) . map ( |s| intern. intern_str ( s) ) ;
604
- OperationKind :: Setter ( match s {
605
- Some ( s) => s,
606
- None => intern. intern_str ( & function. infer_setter_property ( ) ?) ,
607
- } )
608
- }
594
+ ast:: OperationKind :: Getter => OperationKind :: Getter ,
595
+ ast:: OperationKind :: Setter => OperationKind :: Setter ,
609
596
ast:: OperationKind :: IndexingGetter => OperationKind :: IndexingGetter ,
610
597
ast:: OperationKind :: IndexingSetter => OperationKind :: IndexingSetter ,
611
598
ast:: OperationKind :: IndexingDeleter => OperationKind :: IndexingDeleter ,
0 commit comments