diff --git a/src/main.rs b/src/main.rs index 3ece0e12..56b39a77 100644 --- a/src/main.rs +++ b/src/main.rs @@ -221,9 +221,6 @@ fn main() -> Result<(), Error> { } } - let mut reports: Vec<_> = reports.into_iter().collect(); - reports.sort(); - if !reports.is_empty() { terminal.print_separator("Summary"); diff --git a/src/report.rs b/src/report.rs index 50a3c7dc..98a9c9d6 100644 --- a/src/report.rs +++ b/src/report.rs @@ -1,7 +1,6 @@ use std::borrow::Cow; -use std::collections::HashMap; -pub type Report = HashMap; +pub type Report = Vec<(String, bool)>; pub trait Reporter { fn report<'a, M: Into>>(&self, key: M, report: &mut Report); @@ -14,7 +13,7 @@ where fn report<'a, M: Into>>(&self, key: M, report: &mut Report) { match self { Err(_) => { - report.insert(key.into().into_owned(), false); + report.push((key.into().into_owned(), false)); } Ok(item) => { item.report(key, report); @@ -36,12 +35,12 @@ where impl Reporter for bool { fn report<'a, M: Into>>(&self, key: M, report: &mut Report) { - report.insert(key.into().into_owned(), *self); + report.push((key.into().into_owned(), *self)); } } impl Reporter for () { fn report<'a, M: Into>>(&self, key: M, report: &mut Report) { - report.insert(key.into().into_owned(), true); + report.push((key.into().into_owned(), true)); } }