diff --git a/src/commands/show_tasks.rs b/src/commands/show_tasks.rs index 6657cde7c..3b21ae87f 100644 --- a/src/commands/show_tasks.rs +++ b/src/commands/show_tasks.rs @@ -23,7 +23,6 @@ pub fn show_tasks( if let Ok(event) = context.poll_event() { match event { AppEvent::Termion(key) => { - let key = key; match keymap_t.task_view.get(&key) { None => { context diff --git a/src/config/clean/theme/tab.rs b/src/config/clean/theme/tab.rs index f8cf256de..145105a79 100644 --- a/src/config/clean/theme/tab.rs +++ b/src/config/clean/theme/tab.rs @@ -137,14 +137,11 @@ impl From for TabThemeColors { let prefix_a = tab_a.patch_optionally(crude.active_prefix.map(|s| s.as_style())); let postfix_a = prefix_a.patch_optionally(crude.active_postfix.map(|s| s.as_style())); - let tab_i = crude.inactive.map(|s| s.as_style()).unwrap_or(Style::new()); + let tab_i = crude.inactive.map(|s| s.as_style()).unwrap_or_default(); let prefix_i = tab_i.patch_optionally(crude.inactive_prefix.map(|s| s.as_style())); let postfix_i = prefix_i.patch_optionally(crude.inactive_postfix.map(|s| s.as_style())); - let divider_ii = crude - .divider_ii - .map(|s| s.as_style()) - .unwrap_or(Style::new()); + let divider_ii = crude.divider_ii.map(|s| s.as_style()).unwrap_or_default(); let divider_ia = divider_ii.patch_optionally(crude.divider_ia.map(|s| s.as_style())); let divider_ai = divider_ia.patch_optionally(crude.divider_ai.map(|s| s.as_style())); @@ -166,10 +163,7 @@ impl From for TabThemeColors { let scroll_back_postfix = scroll_back_prefix.patch_optionally(crude.scroll_back_postfix.map(|s| s.as_style())); - let padding_fill = crude - .padding_fill - .map(|s| s.as_style()) - .unwrap_or(Style::new()); + let padding_fill = crude.padding_fill.map(|s| s.as_style()).unwrap_or_default(); let padding_prefix = padding_fill.patch_optionally(crude.padding_prefix.map(|s| s.as_style())); let padding_postfix = diff --git a/src/ui/widgets/tui_dirlist_detailed.rs b/src/ui/widgets/tui_dirlist_detailed.rs index ba11ea38f..df11717db 100644 --- a/src/ui/widgets/tui_dirlist_detailed.rs +++ b/src/ui/widgets/tui_dirlist_detailed.rs @@ -125,7 +125,7 @@ fn get_entry_size_string(entry: &JoshutoDirEntry) -> String { .metadata .directory_size() .map(|n| n.to_string()) - .unwrap_or_else(|| "".to_string()), + .unwrap_or_default(), FileType::File => format::file_size_to_string(entry.metadata.len()), } }