diff --git a/Cargo.lock b/Cargo.lock index f04ca1d..a634842 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,7 +283,7 @@ dependencies = [ [[package]] name = "sizeplz" -version = "0.1.0" +version = "0.1.1" dependencies = [ "clap", "futures", diff --git a/Cargo.toml b/Cargo.toml index abfc063..e77d0d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sizeplz" -version = "0.1.0" +version = "0.1.1" authors = ["Sam Huddart "] edition = "2018" description = "A tool to get the size of folders within a directory" diff --git a/src/format.rs b/src/format.rs index 2812ac8..7cb3d5a 100644 --- a/src/format.rs +++ b/src/format.rs @@ -135,7 +135,7 @@ fn format_record(mut record: Record, indent: usize, last: bool, pad: &usize, for } let form = format.autosize(&record.size); - println!("{}{}{} {: >4} {}", ind, record.name, " ".repeat(pad - record.name.len()), form.string(record.size, round), form.suffix()); + println!("{0}{1: <2$} {3: >4} {4}", ind, record.name, pad, form.string(record.size, round), form.suffix()); sort.sort(&mut record.children); if *invert { record.children.reverse(); }