json.rs (hyperfine-1.14.0) | : | json.rs (hyperfine-1.15.0) | ||
---|---|---|---|---|
skipping to change at line 21 | skipping to change at line 21 | |||
struct HyperfineSummary<'a> { | struct HyperfineSummary<'a> { | |||
results: &'a [BenchmarkResult], | results: &'a [BenchmarkResult], | |||
} | } | |||
#[derive(Default)] | #[derive(Default)] | |||
pub struct JsonExporter {} | pub struct JsonExporter {} | |||
impl Exporter for JsonExporter { | impl Exporter for JsonExporter { | |||
fn serialize(&self, results: &[BenchmarkResult], _unit: Option<Unit>) -> Res ult<Vec<u8>> { | fn serialize(&self, results: &[BenchmarkResult], _unit: Option<Unit>) -> Res ult<Vec<u8>> { | |||
let mut output = to_vec_pretty(&HyperfineSummary { results }); | let mut output = to_vec_pretty(&HyperfineSummary { results }); | |||
for content in output.iter_mut() { | if let Ok(ref mut content) = output { | |||
content.push(b'\n'); | content.push(b'\n'); | |||
} | } | |||
Ok(output?) | Ok(output?) | |||
} | } | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |