Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiyaa committed Oct 9, 2023
1 parent cfcefaf commit 7e248bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/commands/show_tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 3 additions & 9 deletions src/config/clean/theme/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,11 @@ impl From<TabThemeColorRaw> 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()));

Expand All @@ -166,10 +163,7 @@ impl From<TabThemeColorRaw> 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 =
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widgets/tui_dirlist_detailed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
}
}
Expand Down

0 comments on commit 7e248bf

Please sign in to comment.