@@ -250,16 +250,14 @@ impl<'a> Module<'a> {
250250 for s in section {
251251 match s? {
252252 Name :: Function ( map) => {
253- let mut map = map. get_map ( ) ?;
254- for _ in 0 ..map. get_count ( ) {
255- let naming = map. read ( ) ?;
253+ for naming in map {
254+ let naming = naming?;
256255 self . func_names . insert ( naming. index , naming. name ) ;
257256 }
258257 }
259258 Name :: Global ( map) => {
260- let mut map = map. get_map ( ) ?;
261- for _ in 0 ..map. get_count ( ) {
262- let naming = map. read ( ) ?;
259+ for naming in map {
260+ let naming = naming?;
263261 self . global_names . insert ( naming. index , naming. name ) ;
264262 }
265263 }
@@ -715,7 +713,7 @@ impl<'a> Module<'a> {
715713macro_rules! define_visit {
716714 ( $( @$p: ident $op: ident $( { $( $arg: ident: $argty: ty) ,* } ) ? => $visit: ident) * ) => {
717715 $(
718- fn $visit( & mut self , _offset : usize $( , $( $arg: $argty) ,* ) ?) {
716+ fn $visit( & mut self $( , $( $arg: $argty) ,* ) ?) {
719717 $(
720718 $(
721719 define_visit!( mark_live self $arg $arg) ;
@@ -822,7 +820,7 @@ macro_rules! define_encode {
822820 ( $( @$p: ident $op: ident $( { $( $arg: ident: $argty: ty) ,* } ) ? => $visit: ident) * ) => {
823821 $(
824822 #[ allow( clippy:: drop_copy) ]
825- fn $visit( & mut self , _offset : usize $( , $( $arg: $argty) ,* ) ?) {
823+ fn $visit( & mut self $( , $( $arg: $argty) ,* ) ?) {
826824 #[ allow( unused_imports) ]
827825 use wasm_encoder:: Instruction :: * ;
828826 $(
0 commit comments