refactor: Updated the 2018 idiom lint to the 2021_compatibility lint

This commit is contained in:
2025-01-26 14:47:40 -07:00
parent 47a3ef1d8b
commit e8a6f740b9
52 changed files with 56 additions and 56 deletions
@@ -21,7 +21,7 @@ pub(super) struct BlocklistHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> BlocklistHandler<'a, 'b> {
impl BlocklistHandler<'_, '_> {
handle_table_events!(
self,
blocklist,
@@ -23,7 +23,7 @@ pub(super) struct CollectionDetailsHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> CollectionDetailsHandler<'a, 'b> {
impl CollectionDetailsHandler<'_, '_> {
handle_table_events!(
self,
collection_movies,
@@ -20,7 +20,7 @@ pub(super) struct EditCollectionHandler<'a, 'b> {
context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> EditCollectionHandler<'a, 'b> {
impl EditCollectionHandler<'_, '_> {
fn build_edit_collection_params(&mut self) -> EditCollectionParams {
let edit_collection_modal = self
.app
@@ -29,7 +29,7 @@ pub(super) struct CollectionsHandler<'a, 'b> {
context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> CollectionsHandler<'a, 'b> {
impl CollectionsHandler<'_, '_> {
handle_table_events!(
self,
collections,
@@ -20,7 +20,7 @@ pub(super) struct DownloadsHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> DownloadsHandler<'a, 'b> {
impl DownloadsHandler<'_, '_> {
handle_table_events!(
self,
downloads,
@@ -19,7 +19,7 @@ pub(super) struct EditIndexerHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> EditIndexerHandler<'a, 'b> {
impl EditIndexerHandler<'_, '_> {
fn build_edit_indexer_params(&mut self) -> EditIndexerParams {
let edit_indexer_modal = self
.app
@@ -20,7 +20,7 @@ pub(super) struct IndexerSettingsHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> IndexerSettingsHandler<'a, 'b> {
impl IndexerSettingsHandler<'_, '_> {
fn build_edit_indexer_settings_body(&mut self) -> IndexerSettings {
self
.app
+1 -1
View File
@@ -31,7 +31,7 @@ pub(super) struct IndexersHandler<'a, 'b> {
context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> IndexersHandler<'a, 'b> {
impl IndexersHandler<'_, '_> {
handle_table_events!(self, indexers, self.app.data.radarr_data.indexers, Indexer);
fn extract_indexer_id(&self) -> i64 {
@@ -17,7 +17,7 @@ pub(super) struct TestAllIndexersHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> TestAllIndexersHandler<'a, 'b> {
impl TestAllIndexersHandler<'_, '_> {
handle_table_events!(
self,
indexer_test_all_results,
@@ -24,7 +24,7 @@ pub(super) struct AddMovieHandler<'a, 'b> {
context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> AddMovieHandler<'a, 'b> {
impl AddMovieHandler<'_, '_> {
handle_table_events!(
self,
add_movie_search_results,
@@ -17,7 +17,7 @@ pub(super) struct DeleteMovieHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> DeleteMovieHandler<'a, 'b> {
impl DeleteMovieHandler<'_, '_> {
fn build_delete_movie_params(&mut self) -> DeleteMovieParams {
let id = self.app.data.radarr_data.movies.current_selection().id;
let delete_movie_files = self.app.data.radarr_data.delete_movie_files;
@@ -20,7 +20,7 @@ pub(super) struct EditMovieHandler<'a, 'b> {
context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> EditMovieHandler<'a, 'b> {
impl EditMovieHandler<'_, '_> {
fn build_edit_movie_params(&mut self) -> EditMovieParams {
let movie_id = self.app.data.radarr_data.movies.current_selection().id;
let edit_movie_modal = self
+1 -1
View File
@@ -34,7 +34,7 @@ pub(super) struct LibraryHandler<'a, 'b> {
context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> LibraryHandler<'a, 'b> {
impl LibraryHandler<'_, '_> {
handle_table_events!(self, movies, self.app.data.radarr_data.movies, Movie);
}
@@ -28,7 +28,7 @@ pub(super) struct MovieDetailsHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> MovieDetailsHandler<'a, 'b> {
impl MovieDetailsHandler<'_, '_> {
handle_table_events!(
self,
movie_releases,
@@ -21,7 +21,7 @@ pub(super) struct RootFoldersHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> RootFoldersHandler<'a, 'b> {
impl RootFoldersHandler<'_, '_> {
handle_table_events!(
self,
root_folders,
@@ -19,7 +19,7 @@ pub(super) struct SystemDetailsHandler<'a, 'b> {
_context: Option<ActiveRadarrBlock>,
}
impl<'a, 'b> SystemDetailsHandler<'a, 'b> {
impl SystemDetailsHandler<'_, '_> {
fn extract_task_name(&self) -> RadarrTaskName {
self
.app