Skip to content

Commit

Permalink
Fix totals
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Nov 8, 2023
1 parent 00a0e99 commit fda0f2f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cargo-about/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,12 @@ fn generate<'kl>(
}
}

overview.iter_mut().for_each(|i| i.count = i.indices.len());
overview.iter_mut().for_each(|i| {
i.count = i
.indices
.iter()
.fold(0, |acc, ndx| acc + licenses[*ndx].used_by.len())
});
// Show the most used licenses first
overview.sort_by(|a, b| b.count.cmp(&a.count));

Expand Down

0 comments on commit fda0f2f

Please sign in to comment.