From a5b88cb73535bec8263687f1340014035e53f770 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 11 Feb 2026 21:01:31 +0100 Subject: [PATCH] chore(bridge): format gen_fixtures.rs Co-Authored-By: Claude Opus 4.6 --- server/tests/gen_fixtures.rs | 44 ++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/server/tests/gen_fixtures.rs b/server/tests/gen_fixtures.rs index 4cd63aff2..f7e4beadf 100644 --- a/server/tests/gen_fixtures.rs +++ b/server/tests/gen_fixtures.rs @@ -28,7 +28,10 @@ fn generate_msgpack_fixtures() { kind: EntityKind::Npc, }], }; - write_fixture("snapshot_one_npc", &rmp_serde::to_vec_named(&snapshot).unwrap()); + write_fixture( + "snapshot_one_npc", + &rmp_serde::to_vec_named(&snapshot).unwrap(), + ); // Empty snapshot let empty = ObserverSnapshot { @@ -42,23 +45,50 @@ fn generate_msgpack_fixtures() { tick: 100, action: PlayerAction::MoveNorth, }; - write_fixture("input_move_north", &rmp_serde::to_vec_named(&input_north).unwrap()); + write_fixture( + "input_move_north", + &rmp_serde::to_vec_named(&input_north).unwrap(), + ); // PlayerInput: UsePerceptionMode let input_perception = PlayerInput { tick: 200, action: PlayerAction::UsePerceptionMode("thermal".to_string()), }; - write_fixture("input_perception_mode", &rmp_serde::to_vec_named(&input_perception).unwrap()); + write_fixture( + "input_perception_mode", + &rmp_serde::to_vec_named(&input_perception).unwrap(), + ); // Snapshot with multiple entities and all EntityKind variants let snapshot_multi = ObserverSnapshot { tick: 999, entities: vec![ - VisibleEntity { entity_id: 1, x: 5.0, y: 10.0, z: 0, kind: EntityKind::Npc }, - VisibleEntity { entity_id: 2, x: 15.5, y: 3.0, z: 1, kind: EntityKind::Object }, - VisibleEntity { entity_id: 3, x: 0.0, y: 0.0, z: -1, kind: EntityKind::Terrain }, + VisibleEntity { + entity_id: 1, + x: 5.0, + y: 10.0, + z: 0, + kind: EntityKind::Npc, + }, + VisibleEntity { + entity_id: 2, + x: 15.5, + y: 3.0, + z: 1, + kind: EntityKind::Object, + }, + VisibleEntity { + entity_id: 3, + x: 0.0, + y: 0.0, + z: -1, + kind: EntityKind::Terrain, + }, ], }; - write_fixture("snapshot_multi_entity", &rmp_serde::to_vec_named(&snapshot_multi).unwrap()); + write_fixture( + "snapshot_multi_entity", + &rmp_serde::to_vec_named(&snapshot_multi).unwrap(), + ); }