Skip to content

Commit 942a41b

Browse files
corvid-agentclaude
andcommitted
fix: apply cargo fmt formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 751f7ff commit 942a41b

3 files changed

Lines changed: 26 additions & 12 deletions

File tree

src/commands/check.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,17 +396,19 @@ fn fix_near_miss_headers(content: &mut String) -> bool {
396396
// Known canonical headers and their near-miss patterns
397397
let canonical_map: &[(&[&str], &str)] = &[
398398
(
399-
&["exportd function", "exportd func", "exproted function", "expported function"],
399+
&[
400+
"exportd function",
401+
"exportd func",
402+
"exproted function",
403+
"expported function",
404+
],
400405
"Exported Functions",
401406
),
402407
(
403408
&["exportd type", "exproted type", "expported type"],
404409
"Exported Types",
405410
),
406-
(
407-
&["exportd class", "exproted class"],
408-
"Exported Classes",
409-
),
411+
(&["exportd class", "exproted class"], "Exported Classes"),
410412
(
411413
&["exportd constant", "exportd const", "exproted constant"],
412414
"Exported Constants",

src/parser.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,18 @@ mod tests {
289289
fn test_strip_yaml_comment() {
290290
assert_eq!(strip_yaml_comment("active"), "active");
291291
assert_eq!(strip_yaml_comment("active # this is the status"), "active");
292-
assert_eq!(strip_yaml_comment("value #no-space-means-not-comment"), "value #no-space-means-not-comment");
293-
assert_eq!(strip_yaml_comment("[42, 57] # issue list"), "[42, 57] # issue list"); // brackets preserved
294-
assert_eq!(strip_yaml_comment("\"quoted # value\""), "\"quoted # value\""); // quotes preserved
292+
assert_eq!(
293+
strip_yaml_comment("value #no-space-means-not-comment"),
294+
"value #no-space-means-not-comment"
295+
);
296+
assert_eq!(
297+
strip_yaml_comment("[42, 57] # issue list"),
298+
"[42, 57] # issue list"
299+
); // brackets preserved
300+
assert_eq!(
301+
strip_yaml_comment("\"quoted # value\""),
302+
"\"quoted # value\""
303+
); // quotes preserved
295304
assert_eq!(strip_yaml_comment("value #"), "value");
296305
}
297306

@@ -310,7 +319,10 @@ mod tests {
310319
// Tabs used for indentation instead of spaces
311320
let content = "---\nmodule: auth\nversion: 1\nstatus: active\nfiles:\n\t- src/auth.ts\n\t- src/auth.utils.ts\n---\n\n# Auth\n";
312321
let parsed = parse_frontmatter(content).unwrap();
313-
assert_eq!(parsed.frontmatter.files, vec!["src/auth.ts", "src/auth.utils.ts"]);
322+
assert_eq!(
323+
parsed.frontmatter.files,
324+
vec!["src/auth.ts", "src/auth.utils.ts"]
325+
);
314326
}
315327

316328
#[test]

src/scoring.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ pub fn score_spec(spec_path: &Path, root: &Path, config: &SpecSyncConfig) -> Spe
122122
} else {
123123
String::new()
124124
};
125-
score.suggestions.push(format!(
126-
"Sections (-{lost}pts): missing ## {names}{suffix}"
127-
));
125+
score
126+
.suggestions
127+
.push(format!("Sections (-{lost}pts): missing ## {names}{suffix}"));
128128
}
129129

130130
// ─── API Coverage (0-20) ─────────────────────────────────────────

0 commit comments

Comments
 (0)