Skip to content

Commit d7c8e32

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

4 files changed

Lines changed: 16 additions & 13 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ pub fn section_has_content(body: &str, section: &str) -> bool {
353353
.filter(|l| {
354354
let t = l.trim().trim_start_matches('|').trim_end_matches('|');
355355
// A separator row contains only dashes, spaces, pipes, and colons
356-
!t.chars().all(|c| c == '-' || c == ' ' || c == '|' || c == ':')
356+
!t.chars()
357+
.all(|c| c == '-' || c == ' ' || c == '|' || c == ':')
357358
})
358359
.count();
359360
// Need at least a header row AND a data row (so > 1 non-separator rows)
@@ -650,7 +651,8 @@ Something
650651

651652
#[test]
652653
fn test_section_has_content_stub_phrases() {
653-
let body = "## Purpose\nTo be determined\n\n## Error Cases\nComing soon\n\n## Dependencies\nTBD\n";
654+
let body =
655+
"## Purpose\nTo be determined\n\n## Error Cases\nComing soon\n\n## Dependencies\nTBD\n";
654656
assert!(!section_has_content(body, "Purpose"));
655657
assert!(!section_has_content(body, "Error Cases"));
656658
assert!(!section_has_content(body, "Dependencies"));

src/scoring.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,7 @@ None.
543543
let tmp = tempfile::tempdir().unwrap();
544544
let src_dir = tmp.path().join("src");
545545
std::fs::create_dir_all(&src_dir).unwrap();
546-
std::fs::write(
547-
src_dir.join("stub.ts"),
548-
"export function doStuff() {}\n",
549-
)
550-
.unwrap();
546+
std::fs::write(src_dir.join("stub.ts"), "export function doStuff() {}\n").unwrap();
551547

552548
let spec_dir = tmp.path().join("specs").join("stub");
553549
std::fs::create_dir_all(&spec_dir).unwrap();
@@ -609,7 +605,10 @@ None.
609605
);
610606
// Should have a suggestion about stub sections
611607
assert!(
612-
score.suggestions.iter().any(|s| s.contains("Stub sections")),
608+
score
609+
.suggestions
610+
.iter()
611+
.any(|s| s.contains("Stub sections")),
613612
"Expected stub section suggestion, got: {:?}",
614613
score.suggestions
615614
);

src/validator.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use crate::config::{default_schema_pattern, discover_manifest_modules};
22
use crate::exports::{get_exported_symbols_with_level, has_extension, is_test_file};
3-
use crate::parser::{find_stub_sections, get_missing_sections, get_spec_symbols, parse_frontmatter};
3+
use crate::parser::{
4+
find_stub_sections, get_missing_sections, get_spec_symbols, parse_frontmatter,
5+
};
46
use crate::schema::{self, SchemaTable};
57
use crate::types::{CoverageReport, SpecSyncConfig, ValidationResult};
68
use regex::Regex;
@@ -397,9 +399,9 @@ pub fn validate_spec(
397399
.map(|(_, f)| f.as_str());
398400
match source_file {
399401
Some(file) => {
400-
result.warnings.push(format!(
401-
"Undocumented export '{sym}' from {file}"
402-
));
402+
result
403+
.warnings
404+
.push(format!("Undocumented export '{sym}' from {file}"));
403405
}
404406
None => {
405407
result

0 commit comments

Comments
 (0)