style: cargo fmt
All checks were successful
CI / Check / Test (push) Successful in 3m1s
Architecture Docs / Generate diagrams (push) Successful in 2m43s

This commit is contained in:
2026-06-17 13:44:19 +02:00
parent a24dc572bd
commit 009c821f48
14 changed files with 1834 additions and 51 deletions

View File

@@ -24,13 +24,15 @@ fn graph_with_one_module() -> NormalizedGraph {
let analyzer = FakeSourceAnalyzer::new().with_result(
"/p/src/orders/order.rs",
AnalysisResult::new(
vec![CodeElement::new(
"Order",
CodeElementKind::Struct,
FilePath::new("/p/src/orders/order.rs").unwrap(),
1,
)
.unwrap()],
vec![
CodeElement::new(
"Order",
CodeElementKind::Struct,
FilePath::new("/p/src/orders/order.rs").unwrap(),
1,
)
.unwrap(),
],
vec![],
vec![],
),
@@ -44,12 +46,22 @@ fn graph_with_one_module() -> NormalizedGraph {
fn graph_with_violation() -> NormalizedGraph {
let mut cg = CodeGraph::new();
let a = CodeElement::new("A", CodeElementKind::Struct, FilePath::new("a.rs").unwrap(), 1)
.unwrap()
.with_module(ModuleName::new("Alpha").unwrap());
let b = CodeElement::new("B", CodeElementKind::Struct, FilePath::new("b.rs").unwrap(), 1)
.unwrap()
.with_module(ModuleName::new("Beta").unwrap());
let a = CodeElement::new(
"A",
CodeElementKind::Struct,
FilePath::new("a.rs").unwrap(),
1,
)
.unwrap()
.with_module(ModuleName::new("Alpha").unwrap());
let b = CodeElement::new(
"B",
CodeElementKind::Struct,
FilePath::new("b.rs").unwrap(),
1,
)
.unwrap()
.with_module(ModuleName::new("Beta").unwrap());
cg.add_element(a);
cg.add_element(b);
cg.add_relationship(Relationship::new("A", "B", RelationshipKind::Composition).unwrap());