Skip to content

Commit 7b04487

Browse files
committed
style(pillar): rustfmt collapse multi-line assert! macros
CI fmt --all --check (Rust 1.95.0, rustfmt 2026-04-16) collapses single-condition assert!(...) calls onto one line when they fit within the configured max width. Apply the canonical formatting to unblock the substrate-tier-12-to-17 CI gate. No behavioral change.
1 parent 847ec7a commit 7b04487

3 files changed

Lines changed: 5 additions & 21 deletions

File tree

src/hpc/pillar/hhtl_contraction.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,7 @@ mod tests {
397397
total += probability_mask(0.5, &mut rng).count_ones();
398398
}
399399
let mean = total as f64 / n as f64;
400-
assert!(
401-
(mean - 32.0).abs() < 0.8,
402-
"p=0.5 mask: mean popcount {mean:.4} not near 32"
403-
);
400+
assert!((mean - 32.0).abs() < 0.8, "p=0.5 mask: mean popcount {mean:.4} not near 32");
404401
}
405402

406403
#[test]

src/hpc/pillar/ogit_lattice.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,7 @@ mod tests {
357357
let direct = generate_schema(&mut rng);
358358
for i in 0..N_TYPES {
359359
for j in i..N_TYPES {
360-
assert!(
361-
!direct[i * N_TYPES + j],
362-
"non-acyclic edge: direct[{i}][{j}] should be false (j >= i)"
363-
);
360+
assert!(!direct[i * N_TYPES + j], "non-acyclic edge: direct[{i}][{j}] should be false (j >= i)");
364361
}
365362
}
366363
}
@@ -401,10 +398,7 @@ mod tests {
401398
}
402399
for v in 0..N_TYPES {
403400
if le[u * N_TYPES + v] {
404-
assert!(
405-
le[t * N_TYPES + v],
406-
"transitivity broken: {t}≤{u}≤{v} but ¬({t}≤{v})"
407-
);
401+
assert!(le[t * N_TYPES + v], "transitivity broken: {t}≤{u}≤{v} but ¬({t}≤{v})");
408402
}
409403
}
410404
}
@@ -421,10 +415,7 @@ mod tests {
421415
for u in (t + 1)..N_TYPES {
422416
let tu = le[t * N_TYPES + u];
423417
let ut = le[u * N_TYPES + t];
424-
assert!(
425-
!(tu && ut),
426-
"antisymmetry broken at pair ({t}, {u}): both directions hold"
427-
);
418+
assert!(!(tu && ut), "antisymmetry broken at pair ({t}, {u}): both directions hold");
428419
}
429420
}
430421
}

src/hpc/pillar/splat_invariants.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,7 @@ pub fn prove_pillar_12() -> PillarReport {
276276
let mut max_rel_err = 0.0_f32;
277277

278278
for _ in 0..N_SPLATS {
279-
let s = [
280-
sample_scale_axis(&mut rng),
281-
sample_scale_axis(&mut rng),
282-
sample_scale_axis(&mut rng),
283-
];
279+
let s = [sample_scale_axis(&mut rng), sample_scale_axis(&mut rng), sample_scale_axis(&mut rng)];
284280
let q = sample_unit_quaternion(&mut rng);
285281
let sigma = covariance_from_scale_quat(s, q);
286282

0 commit comments

Comments
 (0)