refactor: Reduced the number of clones necessary when building modal structs

This commit is contained in:
2025-01-18 13:56:18 -07:00
parent 652bbcd5d4
commit fda69178b9
13 changed files with 203 additions and 276 deletions
@@ -22,18 +22,13 @@ pub(super) struct IndexerSettingsHandler<'a, 'b> {
impl<'a, 'b> IndexerSettingsHandler<'a, 'b> {
fn build_edit_indexer_settings_params(&mut self) -> IndexerSettings {
let indexer_settings = self
self
.app
.data
.sonarr_data
.indexer_settings
.as_ref()
.unwrap()
.clone();
self.app.data.sonarr_data.indexer_settings = None;
indexer_settings
.take()
.expect("IndexerSettings is None")
}
}