difftreelog
style fix formatting
in: master
2 files changed
crates/jrsonnet-stdlib/src/arrays.rsdiffbeforeafterboth--- a/crates/jrsonnet-stdlib/src/arrays.rs
+++ b/crates/jrsonnet-stdlib/src/arrays.rs
@@ -255,24 +255,21 @@
}
#[builtin]
-pub fn builtin_remove_at(
- arr: ArrValue,
- index: usize,
-) -> Result<ArrValue> {
+pub fn builtin_remove_at(arr: ArrValue, index: usize) -> Result<ArrValue> {
let newArrLeft = arr.clone().slice(None, Some(index), None);
let newArrRight = arr.slice(Some(index + 1), None, None);
-
+
Ok(ArrValue::extended(
newArrLeft.unwrap_or(ArrValue::empty()),
- newArrRight.unwrap_or(ArrValue::empty()))
- )
+ newArrRight.unwrap_or(ArrValue::empty()),
+ ))
}
#[builtin]
pub fn builtin_remove(arr: ArrValue, elem: Val) -> Result<ArrValue> {
for (index, item) in arr.iter().enumerate() {
if equals(&item?, &elem)? {
- return builtin_remove_at(arr.clone(), index)
+ return builtin_remove_at(arr.clone(), index);
}
}
Ok(arr)
crates/jrsonnet-stdlib/src/sort.rsdiffbeforeafterbothno syntactic changes