Skip to content

Commit f65516a

Browse files
committed
fix: resolve syntax errors across entire codebase
Fix missing closing parentheses that were causing compilation failures across all Rust source files. These syntax errors were preventing successful builds in CI.
1 parent d236075 commit f65516a

File tree

716 files changed

+7291
-7291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

716 files changed

+7291
-7291
lines changed

cargo-wrt/src/commands/embed_limits.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub fn execute(args: EmbedLimitsArgs, output: &OutputManager) -> Result<()> {
9999
// actual fields
100100
} else {
101101
// Note: TomlQualification structure may need updating
102-
// config.qualification = Some(TomlQualification::default(;
102+
// config.qualification = Some(TomlQualification::default);
103103
}
104104
}
105105

@@ -110,7 +110,7 @@ pub fn execute(args: EmbedLimitsArgs, output: &OutputManager) -> Result<()> {
110110
// actual fields
111111
} else {
112112
// Note: TomlQualification structure may need updating
113-
// config.qualification = Some(TomlQualification::default(;
113+
// config.qualification = Some(TomlQualification::default);
114114
}
115115
}
116116

@@ -194,7 +194,7 @@ fn add_custom_section(
194194
section_name: &str,
195195
section_data: &[u8],
196196
) -> Result<Vec<u8>> {
197-
let mut output = Vec::new(;
197+
let mut output = Vec::new);
198198

199199
// Copy magic number and version
200200
if wasm_bytes.len() < 8 {
@@ -217,7 +217,7 @@ fn replace_custom_section(
217217
section_name: &str,
218218
section_data: &[u8],
219219
) -> Result<Vec<u8>> {
220-
let mut output = Vec::new(;
220+
let mut output = Vec::new);
221221

222222
// Copy magic number and version
223223
if wasm_bytes.len() < 8 {
@@ -274,7 +274,7 @@ fn replace_custom_section(
274274
if !found {
275275
// We need to insert it after the header but before other sections
276276
// For simplicity, we'll recreate the binary with the custom section first
277-
let mut new_output = Vec::new(;
277+
let mut new_output = Vec::new);
278278
new_output.extend_from_slice(&wasm_bytes[0..8];
279279
append_custom_section(&mut new_output, section_name, section_data;
280280
new_output.extend_from_slice(&output[8..];
@@ -292,14 +292,14 @@ fn append_custom_section(output: &mut Vec<u8>, name: &str, data: &[u8]) {
292292
// Calculate section size
293293
let name_len = name.len() as u32;
294294
let name_len_encoded = encode_leb128_u32(name_len;
295-
let section_size = name_len_encoded.len() + name.len() + data.len(;
295+
let section_size = name_len_encoded.len() + name.len() + data.len);
296296

297297
// Write section size
298298
output.extend_from_slice(&encode_leb128_u32(section_size as u32;
299299

300300
// Write name length and name
301301
output.extend_from_slice(&name_len_encoded;
302-
output.extend_from_slice(name.as_bytes(;
302+
output.extend_from_slice(name.as_bytes);
303303

304304
// Write section data
305305
output.extend_from_slice(data;
@@ -337,7 +337,7 @@ fn read_leb128_u32(bytes: &[u8]) -> Result<(u32, usize)> {
337337

338338
/// Encode u32 as LEB128
339339
fn encode_leb128_u32(mut value: u32) -> Vec<u8> {
340-
let mut result = Vec::new(;
340+
let mut result = Vec::new);
341341

342342
loop {
343343
let mut byte = (value & 0x7F) as u8;
@@ -369,7 +369,7 @@ mod tests {
369369
let encoded = encode_leb128_u32(value;
370370
let (decoded, len) = read_leb128_u32(&encoded).unwrap();
371371
assert_eq!(decoded, value;
372-
assert_eq!(len, encoded.len(;
372+
assert_eq!(len, encoded.len);
373373
}
374374
}
375375
}

cargo-wrt/src/commands/test_validate.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ async fn validate_progress_system(_args: &TestValidateArgs, global: &mut GlobalA
160160
global.output_format.clone(),
161161
output.is_colored(),
162162
;
163-
spinner.start(;
163+
spinner.start);
164164

165165
for _ in 0..10 {
166-
spinner.tick(;
166+
spinner.tick);
167167
tokio::time::sleep(Duration::from_millis(50)).await;
168168
}
169169

@@ -176,7 +176,7 @@ async fn validate_progress_system(_args: &TestValidateArgs, global: &mut GlobalA
176176
global.output_format.clone(),
177177
output.is_colored(),
178178
;
179-
bar.start(;
179+
bar.start);
180180

181181
for i in 0..=50 {
182182
bar.update(i;
@@ -185,7 +185,7 @@ async fn validate_progress_system(_args: &TestValidateArgs, global: &mut GlobalA
185185
}
186186
}
187187

188-
bar.finish(;
188+
bar.finish);
189189

190190
// Test multi-step progress
191191
let steps = vec![
@@ -195,8 +195,8 @@ async fn validate_progress_system(_args: &TestValidateArgs, global: &mut GlobalA
195195
];
196196

197197
let mut multi_progress =
198-
MultiStepProgress::new(steps, global.output_format.clone(), output.is_colored(;
199-
multi_progress.start(;
198+
MultiStepProgress::new(steps, global.output_format.clone(), output.is_colored);
199+
multi_progress.start);
200200

201201
multi_progress.begin_step("Initializing system";
202202
tokio::time::sleep(Duration::from_millis(100)).await;
@@ -229,7 +229,7 @@ async fn validate_suggestion_system(
229229
let output = global.output.clone();
230230
output.info("Validating command suggestion system...";
231231

232-
let engine = CommandSuggestionEngine::new(;
232+
let engine = CommandSuggestionEngine::new);
233233

234234
// Test various inputs
235235
let test_cases = vec![
@@ -282,20 +282,20 @@ async fn validate_performance_system(
282282
let output = global.output.clone();
283283
output.info("Validating performance monitoring system...";
284284

285-
let mut optimizer = PerformanceOptimizer::with_defaults(;
285+
let mut optimizer = PerformanceOptimizer::with_defaults);
286286

287287
// Test timing functionality
288288
optimizer.start_timer("validation_test";
289289
tokio::time::sleep(Duration::from_millis(100)).await;
290290
optimizer.stop_timer("validation_test";
291291

292292
// Test cache tracking
293-
optimizer.record_cache_hit(;
294-
optimizer.record_cache_miss(;
295-
optimizer.record_cache_hit(;
296-
optimizer.record_cache_hit(;
293+
optimizer.record_cache_hit);
294+
optimizer.record_cache_miss);
295+
optimizer.record_cache_hit);
296+
optimizer.record_cache_hit);
297297

298-
let report = optimizer.generate_report(;
298+
let report = optimizer.generate_report);
299299

300300
output.info(&format!(
301301
" Command timing: {:.2}s",
@@ -312,7 +312,7 @@ async fn validate_performance_system(
312312
optimizer.cache_hit_ratio() * 100.0
313313
;
314314

315-
let recommendations = optimizer.get_recommendations(;
315+
let recommendations = optimizer.get_recommendations);
316316
if !recommendations.is_empty() {
317317
output.info(&format!(
318318
" Performance recommendations: {}",
@@ -351,15 +351,15 @@ async fn validate_error_handling(_args: &TestValidateArgs, global: &mut GlobalAr
351351

352352
output.info(" Testing error formatting...";
353353

354-
let human_format = test_error.format_human(output.is_colored(;
354+
let human_format = test_error.format_human(output.is_colored);
355355
if global.verbose {
356356
output.indent("Human format:";
357357
for line in human_format.lines().take(5) {
358358
output.indent(&format!(" {}", line;
359359
}
360360
}
361361

362-
let json_format = test_error.format_json(;
362+
let json_format = test_error.format_json);
363363
output.info(&format!(
364364
" JSON format generated: {} fields",
365365
json_format.as_object().map(|o| o.len()).unwrap_or(0)
@@ -452,8 +452,8 @@ async fn run_all_workspace_type_tests(
452452
.validate_all()
453453
.config_context(&format!("Failed to validate {}", name))?;
454454

455-
let total_tests: usize = reports.iter().map(|r| r.total_tests()).sum(;
456-
let successful_tests: usize = reports.iter().map(|r| r.successes.len()).sum(;
455+
let total_tests: usize = reports.iter().map(|r| r.total_tests()).sum);
456+
let successful_tests: usize = reports.iter().map(|r| r.successes.len()).sum);
457457

458458
output.indent(&format!(
459459
" {}/{} tests passed",

cargo-wrt/src/formatters/html.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,16 @@ impl HtmlReportGenerator {
108108
requirements: &[RequirementData],
109109
formatter: &HtmlFormatter,
110110
) -> Result<String> {
111-
let mut content = String::new(;
111+
let mut content = String::new);
112112

113113
content.push_str(r#"<div class="requirements-matrix">"#;
114114
content.push_str(r#"<h2>Requirements Traceability Matrix</h2>"#;
115115

116116
// Summary statistics
117-
let total = requirements.len(;
118-
let implemented = requirements.iter().filter(|r| !r.implementations.is_empty()).count(;
119-
let tested = requirements.iter().filter(|r| !r.tests.is_empty()).count(;
120-
let documented = requirements.iter().filter(|r| !r.documentation.is_empty()).count(;
117+
let total = requirements.len);
118+
let implemented = requirements.iter().filter(|r| !r.implementations.is_empty()).count);
119+
let tested = requirements.iter().filter(|r| !r.tests.is_empty()).count);
120+
let documented = requirements.iter().filter(|r| !r.documentation.is_empty()).count);
121121

122122
content.push_str(&format!(
123123
r#"<div class="summary">
@@ -198,7 +198,7 @@ impl HtmlReportGenerator {
198198

199199
/// Generate safety verification report HTML
200200
pub fn safety_report(report: &SafetyReportData, formatter: &HtmlFormatter) -> Result<String> {
201-
let mut content = String::new(;
201+
let mut content = String::new);
202202

203203
content.push_str(r#"<div class="safety-report">"#;
204204
content.push_str(r#"<h2>Safety Verification Report</h2>"#;
@@ -295,7 +295,7 @@ impl HtmlReportGenerator {
295295
report: &DocumentationReportData,
296296
formatter: &HtmlFormatter,
297297
) -> Result<String> {
298-
let mut content = String::new(;
298+
let mut content = String::new);
299299

300300
content.push_str(r#"<div class="documentation-report">"#;
301301
content.push_str(r#"<h2>Documentation Compliance Report</h2>"#;

cargo-wrt/src/formatters/markdown.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,17 @@ impl MarkdownReportGenerator {
118118
requirements: &[RequirementData],
119119
formatter: &MarkdownFormatter,
120120
) -> Result<String> {
121-
let mut output = String::new(;
121+
let mut output = String::new);
122122

123123
// Header
124124
writeln!(output, "# 📋 Requirements Traceability Matrix\n")?;
125125

126126
// Summary section
127127
if formatter.include_summary {
128-
let total = requirements.len(;
129-
let implemented = requirements.iter().filter(|r| !r.implementations.is_empty()).count(;
130-
let tested = requirements.iter().filter(|r| !r.tests.is_empty()).count(;
131-
let documented = requirements.iter().filter(|r| !r.documentation.is_empty()).count(;
128+
let total = requirements.len);
129+
let implemented = requirements.iter().filter(|r| !r.implementations.is_empty()).count);
130+
let tested = requirements.iter().filter(|r| !r.tests.is_empty()).count);
131+
let documented = requirements.iter().filter(|r| !r.documentation.is_empty()).count);
132132

133133
let coverage =
134134
if total > 0 { (implemented as f64 / total as f64) * 100.0 } else { 0.0 };
@@ -195,7 +195,7 @@ impl MarkdownReportGenerator {
195195
report: &SafetyReportData,
196196
formatter: &MarkdownFormatter,
197197
) -> Result<String> {
198-
let mut output = String::new(;
198+
let mut output = String::new);
199199

200200
// Header
201201
writeln!(output, "# 🛡️ Safety Verification Report\n")?;
@@ -253,7 +253,7 @@ impl MarkdownReportGenerator {
253253
report: &DocumentationReportData,
254254
formatter: &MarkdownFormatter,
255255
) -> Result<String> {
256-
let mut output = String::new(;
256+
let mut output = String::new);
257257

258258
// Header
259259
writeln!(output, "# 📚 Documentation Compliance Report\n")?;
@@ -324,7 +324,7 @@ fn format_requirements_table(
324324
requirements: &[RequirementData],
325325
formatter: &MarkdownFormatter,
326326
) -> Result<String> {
327-
let mut output = String::new(;
327+
let mut output = String::new);
328328

329329
// Table header
330330
writeln!(
@@ -374,7 +374,7 @@ fn generate_asil_breakdown(
374374
requirements: &[RequirementData],
375375
formatter: &MarkdownFormatter,
376376
) -> Result<String> {
377-
let mut asil_counts: HashMap<&str, (usize, usize, usize, usize)> = HashMap::new(;
377+
let mut asil_counts: HashMap<&str, (usize, usize, usize, usize)> = HashMap::new);
378378

379379
for req in requirements {
380380
let entry = asil_counts.entry(&req.asil_level).or_insert((0, 0, 0, 0;
@@ -391,10 +391,10 @@ fn generate_asil_breakdown(
391391
}
392392

393393
if asil_counts.is_empty() {
394-
return Ok(String::new(;
394+
return Ok(String::new);
395395
}
396396

397-
let mut output = String::new(;
397+
let mut output = String::new);
398398

399399
writeln!(
400400
output,
@@ -406,7 +406,7 @@ fn generate_asil_breakdown(
406406
)?;
407407

408408
let mut levels: Vec<_> = asil_counts.keys().collect();
409-
levels.sort(;
409+
levels.sort);
410410

411411
for level in levels {
412412
let (total, impl_count, test_count, doc_count) = asil_counts[level];
@@ -431,13 +431,13 @@ fn format_asil_compliance_table(
431431
compliance: &HashMap<String, f64>,
432432
formatter: &MarkdownFormatter,
433433
) -> Result<String> {
434-
let mut output = String::new(;
434+
let mut output = String::new);
435435

436436
writeln!(output, "| ASIL Level | Compliance |")?;
437437
writeln!(output, "|:-----------|:-----------|")?;
438438

439439
let mut levels: Vec<_> = compliance.keys().collect();
440-
levels.sort(;
440+
levels.sort);
441441

442442
for level in levels {
443443
let percentage = compliance[level];
@@ -454,7 +454,7 @@ fn format_asil_compliance_table(
454454
}
455455

456456
fn format_test_summary(summary: &TestSummaryData, formatter: &MarkdownFormatter) -> Result<String> {
457-
let mut output = String::new(;
457+
let mut output = String::new);
458458

459459
if formatter.github_flavor {
460460
writeln!(output, "- **Total Tests**: {} tests", summary.total_tests)?;
@@ -485,7 +485,7 @@ fn format_test_summary(summary: &TestSummaryData, formatter: &MarkdownFormatter)
485485
}
486486

487487
fn format_recommendations(recommendations: &[String]) -> Result<String> {
488-
let mut output = String::new(;
488+
let mut output = String::new);
489489

490490
for (i, rec) in recommendations.iter().enumerate() {
491491
writeln!(output, "{}. {}", i + 1, rec)?;
@@ -498,13 +498,13 @@ fn format_asil_documentation(
498498
compliance: &HashMap<String, f64>,
499499
formatter: &MarkdownFormatter,
500500
) -> Result<String> {
501-
let mut output = String::new(;
501+
let mut output = String::new);
502502

503503
writeln!(output, "| ASIL Level | Documentation Compliance |")?;
504504
writeln!(output, "|:-----------|:------------------------|")?;
505505

506506
let mut levels: Vec<_> = compliance.keys().collect();
507-
levels.sort(;
507+
levels.sort);
508508

509509
for level in levels {
510510
let percentage = compliance[level];
@@ -534,7 +534,7 @@ pub fn create_github_pr_comment(
534534
summary: &str,
535535
details: Vec<(&str, &str)>, // (section_title, section_content)
536536
) -> String {
537-
let mut output = String::new(;
537+
let mut output = String::new);
538538
539539
// Main title and summary
540540
output.push_str(&format!("## {}\n\n", title;

cargo-wrt/src/helpers/autofix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl AutoFixManager {
3131
/// Apply auto-fixes to a collection of diagnostics
3232
#[must_use]
3333
pub fn apply_fixes(&self, diagnostics: &DiagnosticCollection) -> Result<AutoFixResult> {
34-
let mut result = AutoFixResult::default(;
34+
let mut result = AutoFixResult::default);
3535

3636
for diagnostic in &diagnostics.diagnostics {
3737
if let Some(fix) = self.get_fix_for_diagnostic(diagnostic) {
@@ -94,7 +94,7 @@ impl AutoFixManager {
9494
fn apply_fix(&self, fix: &AutoFix) -> Result<()> {
9595
if self.dry_run {
9696
self.output.info(&format!("[DRY RUN] Would apply: {}", fix.description;
97-
return Ok((;
97+
return Ok();
9898
}
9999

100100
match &fix.fix_type {

0 commit comments

Comments
 (0)