refactor: Refactored to use more idiomatic let-else statements where applicable

This commit is contained in:
2025-12-03 15:23:07 -07:00
parent ad58912baf
commit e50fb88bfc
43 changed files with 1337 additions and 1291 deletions
@@ -42,13 +42,12 @@ pub(super) struct SeriesDetailsUi;
impl DrawUi for SeriesDetailsUi {
fn accepts(route: Route) -> bool {
if let Route::Sonarr(active_sonarr_block, _) = route {
return SeasonDetailsUi::accepts(route)
|| EpisodeDetailsUi::accepts(route)
|| SERIES_DETAILS_BLOCKS.contains(&active_sonarr_block);
}
false
let Route::Sonarr(active_sonarr_block, _) = route else {
return false;
};
SeasonDetailsUi::accepts(route)
|| EpisodeDetailsUi::accepts(route)
|| SERIES_DETAILS_BLOCKS.contains(&active_sonarr_block)
}
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {