diff options
author | Canop <cano.petrole@gmail.com> | 2020-12-01 17:34:25 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-12-01 17:34:25 +0100 |
commit | 9cc16fd465a4fc351c3990b6aaa2022a96da4dde (patch) | |
tree | 4f5fcea11935ade46cab004c7889a31dfe90d803 /src/icon | |
parent | 4f0632a74bfc11e3eebcc04ae6fede1a690ea606 (diff) |
progressive display of file sums (size, counts, date)
More generally, all "pending tasks" (tasks that can be
done after the first result) are done one per done, with
screen redrawn at each step.
Diffstat (limited to 'src/icon')
-rw-r--r-- | src/icon/vscode.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/icon/vscode.rs b/src/icon/vscode.rs index 8869a00..ff01049 100644 --- a/src/icon/vscode.rs +++ b/src/icon/vscode.rs @@ -1,22 +1,22 @@ use { super::*, crate::tree::TreeLineType, - std::collections::HashMap, + fnv::FnvHashMap, }; pub struct VSCodeIconPlugin { - icon_name_to_icon_codepoint_map: HashMap<&'static str, u32>, - file_name_to_icon_name_map: HashMap<&'static str, &'static str>, - double_extension_to_icon_name_map: HashMap<&'static str, &'static str>, - extension_to_icon_name_map: HashMap<&'static str, &'static str>, + icon_name_to_icon_codepoint_map: FnvHashMap<&'static str, u32>, + file_name_to_icon_name_map: FnvHashMap<&'static str, &'static str>, + double_extension_to_icon_name_map: FnvHashMap<&'static str, &'static str>, + extension_to_icon_name_map: FnvHashMap<&'static str, &'static str>, default_icon_point: u32, } impl VSCodeIconPlugin { #[allow(dead_code)] fn sanity_check( - part_to_icon_name_map: &HashMap<&str, &str>, - icon_name_to_icon_codepoint_map: &HashMap<&str, u32>, + part_to_icon_name_map: &FnvHashMap<&str, &str>, + icon_name_to_icon_codepoint_map: &FnvHashMap<&str, u32>, ) { let offending_entries = part_to_icon_name_map .iter() @@ -36,16 +36,16 @@ impl VSCodeIconPlugin { } pub fn new() -> Self { - let icon_name_to_icon_codepoint_map: HashMap<&'static str, u32> + let icon_name_to_icon_codepoint_map: FnvHashMap<&'static str, u32> = ( include!( "../../resources/icons/vscode/data/icon_name_to_icon_code_point_map.rs" ) ).iter().cloned().collect(); - let double_extension_to_icon_name_map: HashMap<&'static str, &'static str> + let double_extension_to_icon_name_map: FnvHashMap<&'static str, &'static str> = ( include!( "../../resources/icons/vscode/data/double_extension_to_icon_name_map.rs" ) ).iter().cloned().collect(); - let extension_to_icon_name_map: HashMap<&'static str, &'static str> + let extension_to_icon_name_map: FnvHashMap<&'static str, &'static str> = ( include!( "../../resources/icons/vscode/data/extension_to_icon_name_map.rs" ) ).iter().cloned().collect(); - let file_name_to_icon_name_map: HashMap<&'static str, &'static str> + let file_name_to_icon_name_map: FnvHashMap<&'static str, &'static str> = ( include!( "../../resources/icons/vscode/data/file_name_to_icon_name_map.rs" ) ).iter().cloned().collect(); #[cfg(debug_assertions)] |