Skip to content

Commit 2ace390

Browse files
konardclaude
andcommitted
style: apply cargo fmt to Rust deduplication tests
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a6c2ad9 commit 2ace390

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

rust/src/query_processor.rs

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,14 @@ mod tests {
524524
let ma_id = storage.search(m_id, a_id).expect("(m a) link should exist");
525525

526526
// Find the outer link ((m a) (m a)) - should have same source and target
527-
let outer_id = storage.search(ma_id, ma_id).expect("((m a) (m a)) link should exist");
527+
let outer_id = storage
528+
.search(ma_id, ma_id)
529+
.expect("((m a) (m a)) link should exist");
528530
let outer_link = storage.get(outer_id).unwrap();
529-
assert_eq!(outer_link.source, outer_link.target, "Outer link should reference the same deduplicated sub-link");
531+
assert_eq!(
532+
outer_link.source, outer_link.target,
533+
"Outer link should reference the same deduplicated sub-link"
534+
);
530535

531536
Ok(())
532537
}
@@ -595,10 +600,14 @@ mod tests {
595600
let ab_id = storage.search(a_id, b_id).expect("(a b) link should exist");
596601

597602
// Find ((a b) (a b)) - should reference (a b) twice
598-
let inner_id = storage.search(ab_id, ab_id).expect("((a b) (a b)) link should exist");
603+
let inner_id = storage
604+
.search(ab_id, ab_id)
605+
.expect("((a b) (a b)) link should exist");
599606

600607
// Find outer link ((a b) ((a b) (a b)))
601-
let outer_id = storage.search(ab_id, inner_id).expect("outer link should exist");
608+
let outer_id = storage
609+
.search(ab_id, inner_id)
610+
.expect("outer link should exist");
602611
assert!(outer_id > 0);
603612

604613
Ok(())
@@ -639,7 +648,9 @@ mod tests {
639648
let ba_id = storage.search(b_id, a_id).expect("(b a) link should exist");
640649

641650
// Find outer link ((a b) (b a)) - should have different source and target
642-
let outer_id = storage.search(ab_id, ba_id).expect("outer link should exist");
651+
let outer_id = storage
652+
.search(ab_id, ba_id)
653+
.expect("outer link should exist");
643654
let outer_link = storage.get(outer_id).unwrap();
644655
assert_ne!(outer_link.source, outer_link.target);
645656

@@ -678,10 +689,14 @@ mod tests {
678689
let xy_id = storage.search(x_id, y_id).expect("(x y) link should exist");
679690

680691
// Find ((x y) (x y)) - references (x y) twice (deduplicated)
681-
let level1_id = storage.search(xy_id, xy_id).expect("((x y) (x y)) link should exist");
692+
let level1_id = storage
693+
.search(xy_id, xy_id)
694+
.expect("((x y) (x y)) link should exist");
682695

683696
// Find (((x y) (x y)) ((x y) (x y))) - references level1 twice (deduplicated)
684-
let level2_id = storage.search(level1_id, level1_id).expect("outer link should exist");
697+
let level2_id = storage
698+
.search(level1_id, level1_id)
699+
.expect("outer link should exist");
685700
assert!(level2_id > 0);
686701

687702
Ok(())
@@ -723,7 +738,9 @@ mod tests {
723738
let pa_id = storage.search(p_id, a_id).expect("(p a) link should exist");
724739

725740
// Find ((p a) (p a)) link - should reference pa_id twice
726-
let outer_id = storage.search(pa_id, pa_id).expect("((p a) (p a)) link should exist");
741+
let outer_id = storage
742+
.search(pa_id, pa_id)
743+
.expect("((p a) (p a)) link should exist");
727744
let outer_link = storage.get(outer_id).unwrap();
728745
assert_eq!(outer_link.source, pa_id);
729746
assert_eq!(outer_link.target, pa_id);

0 commit comments

Comments
 (0)