Skip to content

Commit

Permalink
fix(lint): fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Deep Panchal <deep302001@gmail.com>
  • Loading branch information
deepanchal committed Jun 16, 2024
1 parent 728aae5 commit bd644b0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
// Handle error (e.g., show an error message to the user)
} else {
// Update the book's name in the UI
app.books.items[selected_index].name = new_name.clone();
app.books.items[selected_index].name.clone_from(new_name);
app.show_popup = false;
}
}
Expand Down Expand Up @@ -75,10 +75,9 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
if app.selected_section == TuiSection::BOOKS {
app.show_popup = true;
if app.show_popup {
app.popup_content = app.books.items
app.popup_content.clone_from(&app.books.items
[app.books.state.selected().unwrap_or(0)]
.name
.clone();
.name);
}
}
}
Expand Down

0 comments on commit bd644b0

Please sign in to comment.