From b0deeaf52def28cb389105254de3fa348a7d0d1c Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sun, 22 Sep 2019 19:54:27 -0600 Subject: [PATCH] update deprecated method Signed-off-by: nachoparker --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68f4abc..4c7322e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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)", diff --git a/Cargo.toml b/Cargo.toml index 3435cbf..a377928 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dutree" -version = "0.2.9" +version = "0.2.10" authors = ["nacho "] description = "Command line tool to analyze disk usage" repository = "https://github.com/nachoparker/dutree" diff --git a/src/lib.rs b/src/lib.rs index 554ae1b..ff2b661 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -509,7 +509,7 @@ fn color_from_path<'a>( path : &Path, color_dict : &'a HashMap ) 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() ); }