mirror of
https://github.com/nachoparker/dutree
synced 2024-05-10 23:36:07 +02:00
update deprecated method
Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
parent
efb865eb74
commit
b0deeaf52d
|
@ -10,7 +10,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dutree"
|
name = "dutree"
|
||||||
version = "0.2.9"
|
version = "0.2.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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.9"
|
version = "0.2.10"
|
||||||
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"
|
||||||
|
|
|
@ -509,7 +509,7 @@ fn color_from_path<'a>( path : &Path, color_dict : &'a HashMap<String, String> )
|
||||||
if let Some( ext_str ) = path.extension() {
|
if let Some( ext_str ) = path.extension() {
|
||||||
for ( key , _ ) in color_dict {
|
for ( key , _ ) in color_dict {
|
||||||
if &key[..2] != "*." { continue }
|
if &key[..2] != "*." { continue }
|
||||||
let k = key.trim_left_matches( "*." );
|
let k = key.trim_start_matches( "*." );
|
||||||
if ext_str == k {
|
if ext_str == k {
|
||||||
return Some( &color_dict.get( key ).unwrap() );
|
return Some( &color_dict.get( key ).unwrap() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue