fix(bench): resolve pre-existing clippy warnings in report.rs and mmap_reader.rs
This commit is contained in:
@@ -35,7 +35,7 @@ const HANDLER_NONE: u8 = 0;
|
||||
const HANDLER_DEFAULT: u8 = 1;
|
||||
const HANDLER_IGNORE: u8 = 2;
|
||||
const HANDLER_PLAIN: u8 = 3; // extern "C" fn(c_int)
|
||||
#[expect(clippy::unseparated_literal_suffix, reason = "clarity: this is the SA_SIGACTION variant")]
|
||||
#[allow(clippy::unseparated_literal_suffix, reason = "clarity: this is the SA_SIGACTION variant")]
|
||||
const HANDLER_SIGACTION: u8 = 4; // extern "C" fn(c_int, *mut siginfo_t, *mut c_void)
|
||||
|
||||
/// Old SIGBUS handler type — raw atomic, async-signal-safe to read.
|
||||
|
||||
@@ -143,8 +143,7 @@ pub fn format_report(results: &[BenchmarkResult]) -> String {
|
||||
report.push_str("| Test | Variant | RSS | Peak RSS | Page Faults |\n");
|
||||
report.push_str("|------|---------|-----|----------|-------------|\n");
|
||||
|
||||
let mut mem_rows: Vec<&BenchmarkResult> =
|
||||
category_results.iter().copied().collect();
|
||||
let mut mem_rows: Vec<&BenchmarkResult> = category_results.to_vec();
|
||||
mem_rows.sort_by(|a, b| {
|
||||
(&a.test_name, &a.backend, &a.variant)
|
||||
.cmp(&(&b.test_name, &b.backend, &b.variant))
|
||||
@@ -163,7 +162,10 @@ pub fn format_report(results: &[BenchmarkResult]) -> String {
|
||||
report.push('\n');
|
||||
}
|
||||
|
||||
let mut extras: Vec<(String, String, Vec<(String, f64)>)> = category_results
|
||||
type ExtraEntry = (String, f64);
|
||||
type ExtraGroup = (String, String, Vec<ExtraEntry>);
|
||||
|
||||
let mut extras: Vec<ExtraGroup> = category_results
|
||||
.iter()
|
||||
.filter(|r| !r.extra.is_empty())
|
||||
.map(|r| {
|
||||
|
||||
Reference in New Issue
Block a user