Skip to content

Commit 3b5d43e

Browse files
author
Stephan Dilly
committed
cleanup
1 parent aaf0e4c commit 3b5d43e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/components/revision_files.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use super::{
66
use crate::{
77
keys::SharedKeyConfig,
88
queue::{InternalEvent, Queue},
9-
strings::{self, order},
9+
strings::{self, order, symbol},
1010
ui::{self, common_nav, style::SharedTheme},
1111
AsyncAppNotification, AsyncNotification,
1212
};
@@ -27,10 +27,6 @@ use tui::{
2727
Frame,
2828
};
2929

30-
const FOLDER_ICON_COLLAPSED: &str = "\u{25b8}"; //▸
31-
const FOLDER_ICON_EXPANDED: &str = "\u{25be}"; //▾
32-
const EMPTY_STR: &str = "";
33-
3430
enum Focus {
3531
Tree,
3632
File,
@@ -117,12 +113,12 @@ impl RevisionFilesComponent {
117113
let is_path = item.kind().is_path();
118114
let path_arrow = if is_path {
119115
if item.kind().is_path_collapsed() {
120-
FOLDER_ICON_COLLAPSED
116+
symbol::FOLDER_ICON_COLLAPSED
121117
} else {
122-
FOLDER_ICON_EXPANDED
118+
symbol::FOLDER_ICON_EXPANDED
123119
}
124120
} else {
125-
EMPTY_STR
121+
symbol::EMPTY_STR
126122
};
127123

128124
let path = format!("{}{}{}", indent_str, path_arrow, path);

src/strings.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ pub mod symbol {
2727
pub const CHECKMARK: &str = "\u{2713}"; //✓
2828
pub const SPACE: &str = "\u{02FD}"; //˽
2929
pub const EMPTY_SPACE: &str = " ";
30+
pub const FOLDER_ICON_COLLAPSED: &str = "\u{25b8}"; //▸
31+
pub const FOLDER_ICON_EXPANDED: &str = "\u{25be}"; //▾
32+
pub const EMPTY_STR: &str = "";
3033
}
3134

3235
pub fn title_branches() -> String {

0 commit comments

Comments
 (0)