diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-15 13:20:28 +0800 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-15 13:21:11 +0800 |
commit | 1ce57a29c45ee9896bfc529a13875dbc3859812f (patch) | |
tree | 147f413b5b9104321196f5f587d0769ac5feff23 /src/interactive/widgets | |
parent | afdbc1dadcf6c1f1e6384f65b2cac5325a5bcf17 (diff) |
refactor
Diffstat (limited to 'src/interactive/widgets')
-rw-r--r-- | src/interactive/widgets/entries.rs | 3 | ||||
-rw-r--r-- | src/interactive/widgets/mark.rs | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/interactive/widgets/entries.rs b/src/interactive/widgets/entries.rs index cde0e5b..006673c 100644 --- a/src/interactive/widgets/entries.rs +++ b/src/interactive/widgets/entries.rs @@ -1,4 +1,5 @@ use crate::interactive::{ + path_of, widgets::{ EntryMarkMap, COLOR_BYTESIZE_SELECTED, COLOR_MARKED, COLOR_MARKED_DARK, COLOR_MARKED_DARKER, }, @@ -57,7 +58,7 @@ impl Entries { }; let total: u64 = entries.iter().map(|b| b.data.size).sum(); - let title = match dua::path_of(tree, *root).to_string_lossy().to_string() { + let title = match path_of(tree, *root).to_string_lossy().to_string() { ref p if p.is_empty() => Path::new(".") .canonicalize() .map(|p| p.to_string_lossy().to_string()) diff --git a/src/interactive/widgets/mark.rs b/src/interactive/widgets/mark.rs index 8faf784..688a48a 100644 --- a/src/interactive/widgets/mark.rs +++ b/src/interactive/widgets/mark.rs @@ -1,10 +1,9 @@ use crate::interactive::{ - fit_string_graphemes_with_ellipsis, + fit_string_graphemes_with_ellipsis, path_of, widgets::{COLOR_BYTESIZE_SELECTED, COLOR_MARKED_LIGHT}, CursorDirection, }; use dua::{ - path_of, traverse::{Tree, TreeIndex}, ByteFormat, }; @@ -311,7 +310,6 @@ impl MarkPane { fg: Color::Black, bg: Color::Yellow, modifier: Modifier::BOLD, - ..Default::default() }; Paragraph::new( [ |