diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-09-22 19:54:27 -0600 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-09-22 19:54:27 -0600 |
commit | b0deeaf52def28cb389105254de3fa348a7d0d1c (patch) | |
tree | 3cd0bc9eba12d27faef3924e47cd7b1e6f424c91 | |
parent | efb865eb74d69a9cab8b54f8d6d542f8753bcb3b (diff) |
update deprecated method
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/lib.rs | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -10,7 +10,7 @@ dependencies = [ [[package]] name = "dutree" -version = "0.2.9" +version = "0.2.10" dependencies = [ "getopts 0.2.21 (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] name = "dutree" -version = "0.2.9" +version = "0.2.10" authors = ["nacho <nacho@ownyourbits.com>"] description = "Command line tool to analyze disk usage" repository = "https://github.com/nachoparker/dutree" @@ -509,7 +509,7 @@ fn color_from_path<'a>( path : &Path, color_dict : &'a HashMap<String, String> ) if let Some( ext_str ) = path.extension() { for ( key , _ ) in color_dict { if &key[..2] != "*." { continue } - let k = key.trim_left_matches( "*." ); + let k = key.trim_start_matches( "*." ); if ext_str == k { return Some( &color_dict.get( key ).unwrap() ); } |