diff --git a/src/source.rs b/src/source.rs index b5c7558..30c852e 100644 --- a/src/source.rs +++ b/src/source.rs @@ -56,14 +56,14 @@ pub async fn load( LoadType::Sorting => NyaaHtmlSource::sort(app, w).await, LoadType::Filtering => NyaaHtmlSource::filter(app, w).await, LoadType::Categorizing => NyaaHtmlSource::categorize(app, w).await, - LoadType::Downloading => return Ok(w.results.table.items.clone()), + LoadType::Downloading => Ok(w.results.table.items.clone()), }, Sources::NyaaRss => match load_type { LoadType::Searching => NyaaRssSource::search(app, w).await, LoadType::Sorting => NyaaRssSource::sort(app, w).await, LoadType::Filtering => NyaaRssSource::filter(app, w).await, LoadType::Categorizing => NyaaRssSource::categorize(app, w).await, - LoadType::Downloading => return Ok(w.results.table.items.clone()), + LoadType::Downloading => Ok(w.results.table.items.clone()), }, } } diff --git a/src/widget/category.rs b/src/widget/category.rs index bab7551..1c8194b 100644 --- a/src/widget/category.rs +++ b/src/widget/category.rs @@ -291,7 +291,7 @@ impl Widget for CategoryPopup { } } KeyCode::Char('k') | KeyCode::Up => { - if let Some(_) = ALL_CATEGORIES.get(self.major) { + if ALL_CATEGORIES.get(self.major).is_some() { self.minor = match self.minor < 1 { true => { self.prev_tab();