summaryrefslogtreecommitdiffstats
path: root/src/common.rs
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-03 13:39:44 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-03 13:39:44 +0530
commitdf0fe6279065ba060803e236a73336bdcf8fe4dd (patch)
treec1fb36778a405542cd63d5f5e1c5b7bf25e2417e /src/common.rs
parent90f94f79ac54689c4af47ad31e1080da725cd7ed (diff)
Compute percentage (at all), non-graphical for now
Diffstat (limited to 'src/common.rs')
-rw-r--r--src/common.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common.rs b/src/common.rs
index 5aee23c..ccf8a09 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -14,7 +14,7 @@ pub(crate) fn sorted_entries(
tree: &Tree,
node_idx: TreeIndex,
sorting: SortMode,
-) -> std::vec::IntoIter<(TreeIndex, &EntryData)> {
+) -> Vec<(TreeIndex, &EntryData)> {
use SortMode::*;
tree.neighbors_directed(node_idx, Direction::Outgoing)
.filter_map(|idx| tree.node_weight(idx).map(|w| (idx, w)))
@@ -22,6 +22,7 @@ pub(crate) fn sorted_entries(
SizeDescending => r.size.cmp(&l.size),
SizeAscending => l.size.cmp(&r.size),
})
+ .collect()
}
/// Specifies a way to format bytes