File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use crate :: {
4
4
error:: Error ,
5
- functions:: Function ,
5
+ functions:: { Arguments , Function } ,
6
6
parser:: { Expr , QName } ,
7
7
value:: Value ,
8
8
} ;
@@ -271,8 +271,11 @@ impl Compiled {
271
271
C :: SubRowNum => state. sub_row_num . into ( ) ,
272
272
C :: Constant ( v) => v. clone ( ) ,
273
273
C :: RawFunction { function, args } => {
274
- let args = args. iter ( ) . map ( |c| c. eval ( state) ) . collect :: < Result < _ , _ > > ( ) ?;
275
- let compiled = ( * function) . compile ( & state. compile_context , args) ?;
274
+ let mut eval_args = Arguments :: with_capacity ( args. len ( ) ) ;
275
+ for c in args {
276
+ eval_args. push ( c. eval ( state) ?) ;
277
+ }
278
+ let compiled = ( * function) . compile ( & state. compile_context , eval_args) ?;
276
279
compiled. eval ( state) ?
277
280
}
278
281
C :: GetVariable ( index) => state. compile_context . variables [ * index] . clone ( ) ,
You can’t perform that action at this time.
0 commit comments