summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-12-16 11:12:15 +0100
committerMatthias Beyer <mail@beyermatthias.de>2022-12-16 11:16:42 +0100
commita5aa8b76574145364b07f86d1bd1d80e1c588e31 (patch)
treeaa5d562f6c4a156488dfd90099b459a6738f9474
parent68305741a55a303a6e4ff525d6b8ca05a3706dfd (diff)
Fix clippy: Remove unnecessary cast
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/path/mod.rs5
1 files 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;