refactor: Refactored several usages of sort_by_key and match guards to utilize newer Rust version APIs

This commit is contained in:
2026-06-25 13:18:43 -06:00
parent 4cad9e1755
commit 03d134bec9
42 changed files with 202 additions and 255 deletions
@@ -591,16 +591,15 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveLidarrBlock> for AddArtistHandler<'a,
.tags
)
}
ActiveLidarrBlock::AddArtistPrompt => {
ActiveLidarrBlock::AddArtistPrompt
if self.app.data.lidarr_data.selected_block.get_active_block()
== ActiveLidarrBlock::AddArtistConfirmPrompt
&& matches_key!(confirm, key)
{
self.app.data.lidarr_data.prompt_confirm = true;
self.app.data.lidarr_data.prompt_confirm_action =
Some(LidarrEvent::AddArtist(self.build_add_artist_body()));
self.app.pop_navigation_stack();
}
&& matches_key!(confirm, key) =>
{
self.app.data.lidarr_data.prompt_confirm = true;
self.app.data.lidarr_data.prompt_confirm_action =
Some(LidarrEvent::AddArtist(self.build_add_artist_body()));
self.app.pop_navigation_stack();
}
_ => (),
}