♻️ Código revisado con cargo fmt/clippy

This commit is contained in:
Manuel Cillero 2023-05-14 21:10:47 +02:00
parent 1d82c59c3d
commit 9bb429acf0
5 changed files with 34 additions and 34 deletions

View file

@ -77,8 +77,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])
@ -156,7 +155,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;