From b73b4f33bcf0e4ff2cfa8438433205cd3a323e43 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 20 Jan 2023 14:14:13 +0100 Subject: Fix a few clippy lints --- src/model/array.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/model/array.rs') 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 { - 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); -- cgit v1.2.3