Skip to content

Commit f49427e

Browse files
CopilotashyanSpada
andauthored
fix: apply rustfmt formatting to fix CI cargo fmt check
Agent-Logs-Url: https://github.com/ashyanSpada/expression_engine_rs/sessions/dbc10470-ecea-4681-bc83-ee686fd44aef Co-authored-by: ashyanSpada <22587148+ashyanSpada@users.noreply.github.com>
1 parent bd25ccb commit f49427e

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/function.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,9 @@ impl InnerFunctionManager {
249249
Value::String(s) => Decimal::from_str(&s)
250250
.map(Value::Number)
251251
.map_err(|_| Error::InvalidNumber(s)),
252-
Value::Bool(b) => Ok(Value::Number(if b {
253-
Decimal::ONE
254-
} else {
255-
Decimal::ZERO
256-
})),
252+
Value::Bool(b) => {
253+
Ok(Value::Number(if b { Decimal::ONE } else { Decimal::ZERO }))
254+
}
257255
_ => Err(Error::ParamInvalid()),
258256
}
259257
}),
@@ -431,7 +429,10 @@ mod tests {
431429

432430
#[test]
433431
fn test_concat() {
434-
assert_eq!(run("concat('hello', ' ', 'world')"), Value::from("hello world"));
432+
assert_eq!(
433+
run("concat('hello', ' ', 'world')"),
434+
Value::from("hello world")
435+
);
435436
assert_eq!(run("concat()"), Value::from(""));
436437
assert_eq!(run("concat('only')"), Value::from("only"));
437438
}

0 commit comments

Comments
 (0)