diff options
Diffstat (limited to 'src/model/array.rs')
| -rw-r--r-- | src/model/array.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/array.rs b/src/model/array.rs index 28b9d1a0..0071d4f4 100644 --- a/src/model/array.rs +++ b/src/model/array.rs @@ -183,7 +183,7 @@ impl Array { /// Transform each item in the array with a function. pub fn map(&self, vm: &Vm, func: Func) -> SourceResult<Self> { - if func.argc().map_or(false, |count| count < 1 || count > 2) { + if func.argc().map_or(false, |count| !(1..=2).contains(&count)) { bail!(func.span(), "function must have one or two parameters"); } let enumerate = func.argc() == Some(2); |
