mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
fix: Dust was supposed to take multiple dir args
Dust will now work when given multiple dirs. Before this fix it would only show the largest dir.
This commit is contained in:
+6
-2
@@ -6,12 +6,16 @@ use self::ansi_term::Colour::Fixed;
|
||||
|
||||
static UNITS: [char; 4] = ['T', 'G', 'M', 'K'];
|
||||
|
||||
pub fn display(permissions: bool, to_display: &Vec<&Node>) -> () {
|
||||
pub fn draw_it(permissions: bool, heads: &Vec<Node>, to_display: &Vec<&Node>) -> () {
|
||||
if !permissions {
|
||||
eprintln!("Did not have permissions for all directories");
|
||||
}
|
||||
|
||||
display_node(to_display[0], &to_display, true, 1, "")
|
||||
for d in to_display {
|
||||
if heads.contains(d) {
|
||||
display_node(d, &to_display, true, 1, "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn display_node<S: Into<String>>(
|
||||
|
||||
Reference in New Issue
Block a user