mirror of
https://github.com/nachoparker/dutree
synced 2024-05-09 23:26:05 +02:00
fix ordering in collections
This commit is contained in:
parent
98470a8afc
commit
b047cbf8f1
|
@ -8,7 +8,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dutree"
|
name = "dutree"
|
||||||
version = "0.2.4"
|
version = "0.2.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dutree"
|
name = "dutree"
|
||||||
version = "0.2.7"
|
version = "0.2.8"
|
||||||
authors = ["nacho <nacho@ownyourbits.com>"]
|
authors = ["nacho <nacho@ownyourbits.com>"]
|
||||||
description = "Command line tool to analyze disk usage"
|
description = "Command line tool to analyze disk usage"
|
||||||
repository = "https://github.com/nachoparker/dutree"
|
repository = "https://github.com/nachoparker/dutree"
|
||||||
|
|
|
@ -59,7 +59,7 @@ use std::os::unix::fs::MetadataExt;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
const VERSTR : &str = "v0.2.7";
|
const VERSTR : &str = "v0.2.8";
|
||||||
const DEF_WIDTH : u16 = 80;
|
const DEF_WIDTH : u16 = 80;
|
||||||
|
|
||||||
pub enum XResult<T,S> {
|
pub enum XResult<T,S> {
|
||||||
|
@ -562,6 +562,7 @@ pub fn run( cfg: &Config ) {
|
||||||
bytes += e.bytes;
|
bytes += e.bytes;
|
||||||
entries.push( e );
|
entries.push( e );
|
||||||
}
|
}
|
||||||
|
entries.sort_unstable_by( |a, b| b.bytes.cmp( &a.bytes ) );
|
||||||
let len = entries.len();
|
let len = entries.len();
|
||||||
if len > 0 {
|
if len > 0 {
|
||||||
entries[len-1].last = true;
|
entries[len-1].last = true;
|
||||||
|
|
Loading…
Reference in New Issue