Skip to content

Commit

Permalink
chore(ci): fix lint error to use unwrap_or_default() (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyu08 authored Jun 22, 2024
1 parent 1dfe708 commit 68e5774
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/usecase/fzf_make/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,12 @@ fn render_history_block(
f: &mut Frame,
chunk: ratatui::layout::Rect,
) {
let h = match model.get_history() {
Some(h) => h,
None => vec![],
};

f.render_stateful_widget(
targets_block(" 📚 History ", h, model.current_pane.is_history()),
targets_block(
" 📚 History ",
model.get_history().unwrap_or_default(),
model.current_pane.is_history(),
),
chunk,
// NOTE: It is against TEA's way to update the model value on the UI side, but it is unavoidable so it is allowed.
&mut model.histories_list_state,
Expand Down

0 comments on commit 68e5774

Please sign in to comment.