Skip to content

Commit

Permalink
Ran cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexe1289 committed Jan 18, 2024
1 parent e12a4de commit b8e2317
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/cli_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,12 @@ impl<W: Write> Printer<W> {
Ok(())
}

pub fn print_results<'a, I>(&mut self, languages: I, compact: bool, is_sorted: bool) -> io::Result<()>
pub fn print_results<'a, I>(
&mut self,
languages: I,
compact: bool,
is_sorted: bool,
) -> io::Result<()>
where
I: Iterator<Item = (&'a LanguageType, &'a Language)>,
{
Expand All @@ -337,7 +342,8 @@ impl<W: Write> Printer<W> {

if self.list_files {
self.print_subrow()?;
let mut reports: Vec<&Report> = language.reports.iter().map(|report| &*report).collect();
let mut reports: Vec<&Report> =
language.reports.iter().map(|report| &*report).collect();
if !is_sorted {
reports.sort_by(|&a, &b| a.name.cmp(&b.name));
}
Expand All @@ -346,9 +352,8 @@ impl<W: Write> Printer<W> {
writeln!(self.writer, "{:1$}", report, self.path_length)?;
}
} else {
let (a, b): (Vec<&Report>, Vec<&Report>) = reports
.iter()
.partition(|&r| r.stats.blobs.is_empty());
let (a, b): (Vec<&Report>, Vec<&Report>) =
reports.iter().partition(|&r| r.stats.blobs.is_empty());
for reports in &[&a, &b] {
let mut first = true;
for report in reports.iter() {
Expand Down

0 comments on commit b8e2317

Please sign in to comment.