refactor: Refactored to use more idiomatic let-else statements where applicable
This commit is contained in:
@@ -39,11 +39,10 @@ pub(super) struct EpisodeDetailsUi;
|
||||
|
||||
impl DrawUi for EpisodeDetailsUi {
|
||||
fn accepts(route: Route) -> bool {
|
||||
if let Route::Sonarr(active_sonarr_block, _) = route {
|
||||
return EPISODE_DETAILS_BLOCKS.contains(&active_sonarr_block);
|
||||
}
|
||||
|
||||
false
|
||||
let Route::Sonarr(active_sonarr_block, _) = route else {
|
||||
return false;
|
||||
};
|
||||
EPISODE_DETAILS_BLOCKS.contains(&active_sonarr_block)
|
||||
}
|
||||
|
||||
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, _area: Rect) {
|
||||
|
||||
Reference in New Issue
Block a user