Skip to content

Commit a5aa8b7

Browse files
committed
Fix clippy: Remove unnecessary cast
Signed-off-by: Matthias Beyer <[email protected]>
1 parent 6830574 commit a5aa8b7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/path/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ impl Expression {
163163
let index = sindex_to_uindex(index, array.len());
164164

165165
if index >= array.len() {
166-
array
167-
.resize((index + 1) as usize, Value::new(None, ValueKind::Nil));
166+
array.resize(index + 1, Value::new(None, ValueKind::Nil));
168167
}
169168

170169
Some(&mut array[index])
@@ -238,7 +237,7 @@ impl Expression {
238237
if let ValueKind::Array(ref mut array) = parent.kind {
239238
let uindex = sindex_to_uindex(index, array.len());
240239
if uindex >= array.len() {
241-
array.resize((uindex + 1) as usize, Value::new(None, ValueKind::Nil));
240+
array.resize(uindex + 1, Value::new(None, ValueKind::Nil));
242241
}
243242

244243
array[uindex] = value;

0 commit comments

Comments
 (0)