Skip to content

Commit 5c36a3b

Browse files
kalwaltclaude
andcommitted
style(diagnostic): apply stable rustfmt wrapping (#104 CI)
CI's rustfmt wraps `arlog_*!` macro args and chained Option methods more aggressively than my earlier local pass; align the diagnostic examples to the stable-toolchain rustfmt output so build-and-test goes green. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e057ffc commit 5c36a3b

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

crates/core/examples/diff_patt.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ fn main() {
9999
let c_var = variance(&c_bytes);
100100
let rs_var = variance(&rs_bytes);
101101
if c_var == 0.0 {
102-
arlog_e!("WARN: C buffer has zero variance (all bytes identical) — comparison may be misleading");
102+
arlog_e!(
103+
"WARN: C buffer has zero variance (all bytes identical) — comparison may be misleading"
104+
);
103105
}
104106
if rs_var == 0.0 {
105107
arlog_e!("WARN: Rust buffer has zero variance (all bytes identical) — comparison may be misleading");
@@ -139,7 +141,9 @@ fn main() {
139141
}
140142

141143
fn arg_or(args: &[String], idx: usize, default: &str) -> String {
142-
args.get(idx).cloned().unwrap_or_else(|| default.to_string())
144+
args.get(idx)
145+
.cloned()
146+
.unwrap_or_else(|| default.to_string())
143147
}
144148

145149
fn variance(buf: &[u8]) -> f64 {

crates/core/examples/dump_patt.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -266,22 +266,15 @@ fn main() {
266266
.and_then(|mut f| f.write_all(meta.as_bytes()))
267267
.expect("write rs_ext_patt_meta.txt");
268268

269-
arlog_i!(
270-
"Wrote {} ({} bytes)",
271-
bin_path.display(),
272-
ext_patt.len()
273-
);
269+
arlog_i!("Wrote {} ({} bytes)", bin_path.display(), ext_patt.len());
274270
arlog_i!("Wrote {}", meta_path.display());
275-
arlog_i!(
276-
"cf={:.4} id={} dir={}",
277-
marker.cf,
278-
marker.id,
279-
marker.dir
280-
);
271+
arlog_i!("cf={:.4} id={} dir={}", marker.cf, marker.id, marker.dir);
281272
}
282273

283274
fn arg_or_default(args: &[String], idx: usize, default: &str) -> String {
284-
args.get(idx).cloned().unwrap_or_else(|| default.to_string())
275+
args.get(idx)
276+
.cloned()
277+
.unwrap_or_else(|| default.to_string())
285278
}
286279

287280
fn mode_name(m: i32) -> &'static str {

0 commit comments

Comments
 (0)