diff --git a/src/eval.rs b/src/eval.rs index c7e50a802c..fb8d1d4447 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -172,7 +172,7 @@ fn eval_apply(expr: Evaluated, args: Vec, vars: &Scope) -> Evaluated { } #[inline(always)] -fn eval_closure(args: Vec, arg_patterns: SmallVec<[Pattern; 4]>, vars: &Scope) +fn eval_closure(args: Vec, arg_patterns: SmallVec<[Pattern; 2]>, vars: &Scope) -> Result { if arg_patterns.len() == args.len() { @@ -292,7 +292,7 @@ fn eval_operator(Evaluated(left_expr): &Evaluated, op: Operator, Evaluated(right } #[inline(always)] -fn eval_case (condition: Evaluated, branches: SmallVec<[(Pattern, Box); 4]>, vars: &Scope) -> Evaluated { +fn eval_case (condition: Evaluated, branches: SmallVec<[(Pattern, Box); 2]>, vars: &Scope) -> Evaluated { let Evaluated(ref evaluated_expr) = condition; for (pattern, definition) in branches { diff --git a/src/expr.rs b/src/expr.rs index 8fa8b60018..9f6a29b2d8 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -19,7 +19,7 @@ pub enum Expr { Func(Ident, Vec), Apply(Box, Vec), Operator(Box, Operator, Box), - Closure(SmallVec<[Pattern; 4]>, Box), + Closure(SmallVec<[Pattern; 2]>, Box), // Sum Types ApplyVariant(String, Option>), @@ -29,7 +29,7 @@ pub enum Expr { // Conditionals If(Box, Box, Box), - Case(Box, SmallVec<[(Pattern, Box); 4]>), + Case(Box, SmallVec<[(Pattern, Box); 2]>), // Error Error(Problem),