fix(style): Addressed linter complaints on formatting
This commit is contained in:
@@ -577,7 +577,7 @@ mod tests {
|
||||
ActiveSonarrBlock::ManualEpisodeSearchConfirmPrompt,
|
||||
None,
|
||||
)
|
||||
.handle();
|
||||
.handle();
|
||||
|
||||
assert!(app.data.sonarr_data.prompt_confirm);
|
||||
assert_eq!(
|
||||
|
||||
@@ -10,7 +10,10 @@ mod tests {
|
||||
use crate::event::Key;
|
||||
use crate::handlers::sonarr_handlers::library::{series_sorting_options, LibraryHandler};
|
||||
use crate::handlers::KeyEventHandler;
|
||||
use crate::models::servarr_data::sonarr::sonarr_data::{ActiveSonarrBlock, ADD_SERIES_BLOCKS, DELETE_SERIES_BLOCKS, EDIT_SERIES_BLOCKS, EPISODE_DETAILS_BLOCKS, LIBRARY_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS};
|
||||
use crate::models::servarr_data::sonarr::sonarr_data::{
|
||||
ActiveSonarrBlock, ADD_SERIES_BLOCKS, DELETE_SERIES_BLOCKS, EDIT_SERIES_BLOCKS,
|
||||
EPISODE_DETAILS_BLOCKS, LIBRARY_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS,
|
||||
};
|
||||
use crate::models::sonarr_models::{Series, SeriesStatus, SeriesType};
|
||||
use crate::test_handler_delegation;
|
||||
|
||||
@@ -556,7 +559,7 @@ mod tests {
|
||||
ActiveSonarrBlock::SeasonHistoryDetails,
|
||||
ActiveSonarrBlock::ManualSeasonSearch,
|
||||
ActiveSonarrBlock::ManualSeasonSearchSortPrompt,
|
||||
ActiveSonarrBlock::DeleteEpisodeFilePrompt,
|
||||
ActiveSonarrBlock::DeleteEpisodeFilePrompt
|
||||
)]
|
||||
active_sonarr_block: ActiveSonarrBlock,
|
||||
) {
|
||||
@@ -576,7 +579,7 @@ mod tests {
|
||||
ActiveSonarrBlock::EpisodeHistoryDetails,
|
||||
ActiveSonarrBlock::ManualEpisodeSearch,
|
||||
ActiveSonarrBlock::ManualEpisodeSearchSortPrompt,
|
||||
ActiveSonarrBlock::DeleteEpisodeFilePrompt,
|
||||
ActiveSonarrBlock::DeleteEpisodeFilePrompt
|
||||
)]
|
||||
active_sonarr_block: ActiveSonarrBlock,
|
||||
) {
|
||||
|
||||
@@ -30,12 +30,12 @@ use crate::handlers::table_handler::TableHandlingConfig;
|
||||
mod add_series_handler;
|
||||
mod delete_series_handler;
|
||||
|
||||
mod episode_details_handler;
|
||||
#[cfg(test)]
|
||||
#[path = "library_handler_tests.rs"]
|
||||
mod library_handler_tests;
|
||||
mod series_details_handler;
|
||||
mod season_details_handler;
|
||||
mod episode_details_handler;
|
||||
mod series_details_handler;
|
||||
|
||||
pub(super) struct LibraryHandler<'a, 'b> {
|
||||
key: Key,
|
||||
|
||||
@@ -342,8 +342,10 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeasonDetailsHandler
|
||||
self.app.data.sonarr_data.prompt_confirm = true;
|
||||
self.app.data.sonarr_data.prompt_confirm_action =
|
||||
Some(SonarrEvent::ToggleEpisodeMonitoring(None));
|
||||
|
||||
self.app.pop_and_push_navigation_stack(self.active_sonarr_block.into());
|
||||
|
||||
self
|
||||
.app
|
||||
.pop_and_push_navigation_stack(self.active_sonarr_block.into());
|
||||
}
|
||||
ActiveSonarrBlock::SeasonDetails
|
||||
| ActiveSonarrBlock::SeasonHistory
|
||||
@@ -416,7 +418,8 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeasonDetailsHandler
|
||||
}
|
||||
}
|
||||
|
||||
pub(in crate::handlers::sonarr_handlers::library) fn releases_sorting_options() -> Vec<SortOption<SonarrRelease>> {
|
||||
pub(in crate::handlers::sonarr_handlers::library) fn releases_sorting_options(
|
||||
) -> Vec<SortOption<SonarrRelease>> {
|
||||
vec![
|
||||
SortOption {
|
||||
name: "Source",
|
||||
|
||||
@@ -559,7 +559,7 @@ mod tests {
|
||||
ActiveSonarrBlock::SeasonDetails,
|
||||
None,
|
||||
)
|
||||
.handle();
|
||||
.handle();
|
||||
|
||||
assert_eq!(
|
||||
app.get_current_route(),
|
||||
@@ -586,9 +586,12 @@ mod tests {
|
||||
ActiveSonarrBlock::SeasonDetails,
|
||||
None,
|
||||
)
|
||||
.handle();
|
||||
.handle();
|
||||
|
||||
assert_eq!(app.get_current_route(), ActiveSonarrBlock::SeasonDetails.into());
|
||||
assert_eq!(
|
||||
app.get_current_route(),
|
||||
ActiveSonarrBlock::SeasonDetails.into()
|
||||
);
|
||||
assert!(!app.data.sonarr_data.prompt_confirm);
|
||||
assert!(app.data.sonarr_data.prompt_confirm_action.is_none());
|
||||
assert!(!app.is_routing);
|
||||
|
||||
@@ -261,8 +261,10 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeriesDetailsHandler
|
||||
self.app.data.sonarr_data.prompt_confirm = true;
|
||||
self.app.data.sonarr_data.prompt_confirm_action =
|
||||
Some(SonarrEvent::ToggleSeasonMonitoring(None));
|
||||
|
||||
self.app.pop_and_push_navigation_stack(self.active_sonarr_block.into());
|
||||
|
||||
self
|
||||
.app
|
||||
.pop_and_push_navigation_stack(self.active_sonarr_block.into());
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
|
||||
@@ -388,7 +388,7 @@ mod tests {
|
||||
ActiveSonarrBlock::SeriesDetails,
|
||||
None,
|
||||
)
|
||||
.handle();
|
||||
.handle();
|
||||
|
||||
assert_eq!(
|
||||
app.get_current_route(),
|
||||
@@ -415,9 +415,12 @@ mod tests {
|
||||
ActiveSonarrBlock::SeriesDetails,
|
||||
None,
|
||||
)
|
||||
.handle();
|
||||
.handle();
|
||||
|
||||
assert_eq!(app.get_current_route(), ActiveSonarrBlock::SeriesDetails.into());
|
||||
assert_eq!(
|
||||
app.get_current_route(),
|
||||
ActiveSonarrBlock::SeriesDetails.into()
|
||||
);
|
||||
assert!(!app.data.sonarr_data.prompt_confirm);
|
||||
assert!(app.data.sonarr_data.prompt_confirm_action.is_none());
|
||||
assert!(!app.is_routing);
|
||||
|
||||
Reference in New Issue
Block a user