File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 22 remote: .
33 specs:
44 wasmtime (19.0.0 )
5- rb_sys (~> 0.9.86 )
5+ rb_sys (~> 0.9.97 )
66
77GEM
88 remote: https://rubygems.org/
Original file line number Diff line number Diff line change @@ -127,11 +127,11 @@ impl ToExtern for Value {
127127}
128128
129129pub trait ToSym {
130- fn as_sym ( & self ) -> Result < Symbol , Error > ;
130+ fn to_sym ( & self ) -> Result < Symbol , Error > ;
131131}
132132
133133impl ToSym for ValType {
134- fn as_sym ( & self ) -> Result < Symbol , Error > {
134+ fn to_sym ( & self ) -> Result < Symbol , Error > {
135135 if self . matches ( & ValType :: EXTERNREF ) {
136136 return Ok ( Symbol :: from ( * EXTERNREF ) ) ;
137137 }
@@ -152,7 +152,7 @@ impl ToSym for ValType {
152152}
153153
154154impl ToSym for RefType {
155- fn as_sym ( & self ) -> Result < Symbol , Error > {
155+ fn to_sym ( & self ) -> Result < Symbol , Error > {
156156 if self . matches ( & RefType :: FUNCREF ) {
157157 return Ok ( Symbol :: from ( * FUNCREF ) ) ;
158158 }
Original file line number Diff line number Diff line change @@ -136,8 +136,8 @@ impl<'a> Func<'a> {
136136 let len = ty. params ( ) . len ( ) ;
137137 let mut params = ty. params ( ) ;
138138 params. try_fold ( RArray :: with_capacity ( len) , |array, p| {
139- array. push ( p. as_sym ( ) ?) . map_err ( |e| error ! ( "{e}" ) ) ?;
140- Ok :: < _ , Error > ( array)
139+ array. push ( p. to_sym ( ) ?) ?;
140+ Ok ( array)
141141 } )
142142 }
143143
@@ -148,8 +148,8 @@ impl<'a> Func<'a> {
148148 let len = ty. results ( ) . len ( ) ;
149149 let mut results = ty. results ( ) ;
150150 results. try_fold ( RArray :: with_capacity ( len) , |array, r| {
151- array. push ( r. as_sym ( ) ?) . map_err ( |e| error ! ( "{e}" ) ) ?;
152- Ok :: < _ , Error > ( array)
151+ array. push ( r. to_sym ( ) ?) ?;
152+ Ok ( array)
153153 } )
154154 }
155155
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl<'a> Global<'a> {
9595 /// @def type
9696 /// @return [Symbol] The Wasm type of the global‘s content.
9797 pub fn type_ ( & self ) -> Result < Symbol , Error > {
98- self . ty ( ) ?. content ( ) . as_sym ( )
98+ self . ty ( ) ?. content ( ) . to_sym ( )
9999 }
100100
101101 /// @yard
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ impl<'a> Table<'a> {
8989 /// @def type
9090 /// @return [Symbol] The Wasm type of the elements of this table.
9191 pub fn type_ ( & self ) -> Result < Symbol , Error > {
92- self . ty ( ) ?. element ( ) . as_sym ( )
92+ self . ty ( ) ?. element ( ) . to_sym ( )
9393 }
9494
9595 /// @yard
You can’t perform that action at this time.
0 commit comments