summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-12-16 11:26:56 +0100
committerGitHub <noreply@github.com>2022-12-16 11:26:56 +0100
commit040958c6272595a8cb4f59ccdbcbd35bc0de9c58 (patch)
treeaa5d562f6c4a156488dfd90099b459a6738f9474
parent68305741a55a303a6e4ff525d6b8ca05a3706dfd (diff)
parenta5aa8b76574145364b07f86d1bd1d80e1c588e31 (diff)
Merge pull request #406 from matthiasbeyer/fix-clippy-unnecessary-cast
Fix clippy: Remove unnecessary cast
-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;