File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/api/src/externals Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -165,14 +165,14 @@ impl Function {
165165 wasmer:: RuntimeError :: new ( io:: Error :: from ( error) . to_string ( ) )
166166 } ) ?;
167167
168- let result_types = environment. result_types . clone ( ) ;
168+ let result_types = & environment. result_types ;
169169 let has_result_types = !result_types. is_empty ( ) ;
170170
171171 Ok ( if let Ok ( results) = results. cast_as :: < PyTuple > ( py) {
172172 results
173173 . iter ( )
174174 . zip ( result_types)
175- . map ( to_wasm_value)
175+ . map ( | ( value , ty ) | to_wasm_value ( ( value , * ty ) ) )
176176 . collect :: < PyResult < _ > > ( )
177177 . map_err ( |error| {
178178 wasmer:: RuntimeError :: new ( io:: Error :: from ( error) . to_string ( ) )
@@ -205,8 +205,8 @@ impl Function {
205205 fn __call__ < ' p > ( & self , py : Python < ' p > , arguments : & PyTuple ) -> PyResult < PyObject > {
206206 let arguments: Vec < wasmer:: Value > = arguments
207207 . iter ( )
208- . zip ( self . inner . ty ( ) . params ( ) . iter ( ) . cloned ( ) )
209- . map ( to_wasm_value)
208+ . zip ( self . inner . ty ( ) . params ( ) )
209+ . map ( | ( value , ty ) | to_wasm_value ( ( value , * ty ) ) )
210210 . collect :: < PyResult < _ > > ( ) ?;
211211
212212 let results = self
You can’t perform that action at this time.
0 commit comments