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
@@ -30,19 +30,17 @@ impl<'a, 'b> RootFoldersHandler<'a, 'b> {
);
fn build_add_root_folder_body(&mut self) -> AddRootFolderBody {
let path = self
let edit_root_folder = self
.app
.data
.radarr_data
.edit_root_folder
.as_ref()
.unwrap()
.text
.clone();
.take()
.expect("AddRootFolder is None");
self.app.data.radarr_data.edit_root_folder = None;
AddRootFolderBody { path }
AddRootFolderBody {
path: edit_root_folder.text,
}
}
fn extract_root_folder_id(&mut self) -> i64 {