Skip to content

Commit b207b2d

Browse files
committed
chore(state): cargo fmt cleanup on append unit tests
Two-line collapse from `cargo fmt` running over the new test bodies that landed with `fix(state): apply nested-path append in update_ops apply loop`. Pure formatting, no behavior change. Ridden with [Loa](https://github.com/0xHoneyJar/loa)
1 parent 4ac386d commit b207b2d

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

engine/src/update_ops.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,19 +1381,13 @@ mod tests {
13811381
// error and leaves state unchanged.
13821382
let (updated, errors) = apply_update_ops(
13831383
Some(json!({ "entityId": { "buffer": { "x": "y" } } })),
1384-
&[UpdateOp::append_at_path(
1385-
["entityId", "buffer"],
1386-
json!("z"),
1387-
)],
1384+
&[UpdateOp::append_at_path(["entityId", "buffer"], json!("z"))],
13881385
);
13891386

13901387
assert_eq!(errors.len(), 1);
13911388
assert_eq!(errors[0].code, super::ERR_APPEND_TYPE_MISMATCH);
13921389
// State unchanged: the object at the leaf was not mutated.
1393-
assert_eq!(
1394-
updated,
1395-
json!({ "entityId": { "buffer": { "x": "y" } } })
1396-
);
1390+
assert_eq!(updated, json!({ "entityId": { "buffer": { "x": "y" } } }));
13971391
}
13981392

13991393
#[test]
@@ -1430,7 +1424,10 @@ mod tests {
14301424
fn append_proto_polluted_at_intermediate_segment_rejected() {
14311425
let (updated, errors) = apply_update_ops(
14321426
Some(json!({})),
1433-
&[UpdateOp::append_at_path(["a", "constructor", "b"], json!("x"))],
1427+
&[UpdateOp::append_at_path(
1428+
["a", "constructor", "b"],
1429+
json!("x"),
1430+
)],
14341431
);
14351432

14361433
assert_eq!(errors.len(), 1);

0 commit comments

Comments
 (0)