diff options
| author | Valentin Popov <valentin@popov.link> | 2026-07-18 04:28:07 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-07-18 04:28:07 +0300 |
| commit | 2da28d0495e75a0954c194e2e0c4db03c23cb05f (patch) | |
| tree | 2aa909ea4c197b5265064ef3974bce00fc5fc4c9 /crates/fparkan-prototype | |
| parent | 02b4da2e3d78cc7df7278d7b17cf65620d58db54 (diff) | |
| download | fparkan-2da28d0495e75a0954c194e2e0c4db03c23cb05f.tar.xz fparkan-2da28d0495e75a0954c194e2e0c4db03c23cb05f.zip | |
style: format workspace with Rust 1.97
Diffstat (limited to 'crates/fparkan-prototype')
| -rw-r--r-- | crates/fparkan-prototype/src/lib.rs | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/crates/fparkan-prototype/src/lib.rs b/crates/fparkan-prototype/src/lib.rs index d1682bf..6570a95 100644 --- a/crates/fparkan-prototype/src/lib.rs +++ b/crates/fparkan-prototype/src/lib.rs @@ -209,7 +209,11 @@ pub struct PrototypeGraphNode { impl PrototypeGraphNode { /// Creates a typed resource node. #[must_use] - pub fn resource(kind: PrototypeGraphNodeKind, resource: ResourceKey, id: PrototypeGraphNodeId) -> Self { + pub fn resource( + kind: PrototypeGraphNodeKind, + resource: ResourceKey, + id: PrototypeGraphNodeId, + ) -> Self { Self { id, kind, @@ -1656,15 +1660,24 @@ mod tests { fn malformed_unit_dat_failure_is_classified_on_unit_edge() { let mut vfs = MemoryVfs::default(); let dat_path = resource_archive_path(b"UNITS/AUTO/bad.dat").expect("dat path"); - vfs.insert(dat_path, Arc::from([1_u8, 2, 3].to_vec().into_boxed_slice())); + vfs.insert( + dat_path, + Arc::from([1_u8, 2, 3].to_vec().into_boxed_slice()), + ); let vfs = Arc::new(vfs); let repo = CachedResourceRepository::new(vfs.clone()); - let (_graph, _resolved, report) = - build_prototype_graph_report(&repo, vfs.as_ref(), &[resource_name(b"UNITS/AUTO/bad.dat")]); + let (_graph, _resolved, report) = build_prototype_graph_report( + &repo, + vfs.as_ref(), + &[resource_name(b"UNITS/AUTO/bad.dat")], + ); assert_eq!(report.failures.len(), 1); - assert_eq!(report.failures[0].edge, PrototypeGraphEdge::MissionToUnitDat); + assert_eq!( + report.failures[0].edge, + PrototypeGraphEdge::MissionToUnitDat + ); } #[test] @@ -1690,7 +1703,10 @@ mod tests { ); assert_eq!(report.failures.len(), 1); - assert_eq!(report.failures[0].edge, PrototypeGraphEdge::UnitDatToComponent); + assert_eq!( + report.failures[0].edge, + PrototypeGraphEdge::UnitDatToComponent + ); assert!(report.failures[0].message.contains("missing_component")); } @@ -2007,10 +2023,7 @@ mod tests { assert_eq!(report.failures.len(), 1); assert_eq!(report.failures[0].resource_raw, b"broken"); - assert_eq!( - report.failures[0].edge, - PrototypeGraphEdge::PrototypeToMesh - ); + assert_eq!(report.failures[0].edge, PrototypeGraphEdge::PrototypeToMesh); assert!(report.failures[0].message.contains("broken")); assert!(report.failures[0] .message |
