From a5aa8b76574145364b07f86d1bd1d80e1c588e31 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 16 Dec 2022 11:12:15 +0100 Subject: Fix clippy: Remove unnecessary cast Signed-off-by: Matthias Beyer --- src/path/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/path/mod.rs b/src/path/mod.rs index b3773d1..7a0903a 100644 --- a/src/path/mod.rs +++ b/src/path/mod.rs @@ -163,8 +163,7 @@ impl Expression { let index = sindex_to_uindex(index, array.len()); if index >= array.len() { - array - .resize((index + 1) as usize, Value::new(None, ValueKind::Nil)); + array.resize(index + 1, Value::new(None, ValueKind::Nil)); } Some(&mut array[index]) @@ -238,7 +237,7 @@ impl Expression { if let ValueKind::Array(ref mut array) = parent.kind { let uindex = sindex_to_uindex(index, array.len()); if uindex >= array.len() { - array.resize((uindex + 1) as usize, Value::new(None, ValueKind::Nil)); + array.resize(uindex + 1, Value::new(None, ValueKind::Nil)); } array[uindex] = value; -- cgit v1.2.3