Skip to content

Commit

Permalink
Remove unused args in fmt_test_json
Browse files Browse the repository at this point in the history
  • Loading branch information
Riley-Kilgore committed Sep 16, 2024
1 parent cef3276 commit f3f7ec7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/aiken-project/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ where
property_max_success,
}
},
json: json,
json,
};

self.compile(options)
Expand Down
11 changes: 3 additions & 8 deletions crates/aiken-project/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl EventListener for Terminal {
"modules": group_by_module(&tests).iter().map(|(module, results)| {
serde_json::json!({
"name": module,
"tests": results.iter().map(|r| fmt_test_json(r, max_mem, max_cpu, max_iter)).collect::<Vec<_>>(),
"tests": results.iter().map(|r| fmt_test_json(r)).collect::<Vec<_>>(),
"summary": fmt_test_summary_json(results)
})
}).collect::<Vec<_>>(),
Expand Down Expand Up @@ -513,12 +513,7 @@ fn fmt_test_summary<T>(tests: &[&TestResult<T, T>], styled: bool) -> String {
)
}

fn fmt_test_json(
result: &TestResult<UntypedExpr, UntypedExpr>,
max_mem: usize,
max_cpu: usize,
max_iter: usize,
) -> serde_json::Value {
fn fmt_test_json(result: &TestResult<UntypedExpr, UntypedExpr>) -> serde_json::Value {
let mut test = json!({
"name": result.title(),
"status": if result.is_success() { "PASS" } else { "FAIL" },
Expand Down Expand Up @@ -602,7 +597,7 @@ fn fmt_overall_summary_json(tests: &[TestResult<UntypedExpr, UntypedExpr>]) -> s
"modules": modules.into_iter().map(|(module, results)| {
json!({
"name": module,
"tests": results.iter().map(|r| fmt_test_json(r, max_mem, max_cpu, max_iter)).collect::<Vec<_>>(),
"tests": results.iter().map(|r| fmt_test_json(r)).collect::<Vec<_>>(),
"summary": fmt_test_summary_json(&results),
})
}).collect::<Vec<_>>(),
Expand Down

0 comments on commit f3f7ec7

Please sign in to comment.