don't restuct references just to reborrow
This commit is contained in:
parent
35a99eef32
commit
a108d55ce6
22 changed files with 41 additions and 42 deletions
|
@ -121,7 +121,7 @@ impl<'k> StatCollector<'k> {
|
|||
|
||||
fn print(&self, title: &str, prefix: &str) {
|
||||
let mut nodes: Vec<_> = self.nodes.iter().collect();
|
||||
nodes.sort_by_key(|&(_, ref node)| node.stats.count * node.stats.size);
|
||||
nodes.sort_by_key(|(_, node)| node.stats.count * node.stats.size);
|
||||
|
||||
let total_size = nodes.iter().map(|(_, node)| node.stats.count * node.stats.size).sum();
|
||||
|
||||
|
@ -147,7 +147,7 @@ impl<'k> StatCollector<'k> {
|
|||
);
|
||||
if !node.subnodes.is_empty() {
|
||||
let mut subnodes: Vec<_> = node.subnodes.iter().collect();
|
||||
subnodes.sort_by_key(|&(_, ref subnode)| subnode.count * subnode.size);
|
||||
subnodes.sort_by_key(|(_, subnode)| subnode.count * subnode.size);
|
||||
|
||||
for (label, subnode) in subnodes {
|
||||
let size = subnode.count * subnode.size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue