compose/gpg.rs: Fix msrv regression

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
This commit is contained in:
Manos Pitsidianakis 2024-12-04 18:19:32 +02:00
parent ed85da51df
commit 192ecea2a4
No known key found for this signature in database
GPG key ID: 7729C7707F7E09D0

View file

@ -183,10 +183,11 @@ impl Component for KeySelection {
{
let mut main_handle_ref = &mut (*main_handle);
let is_main = *id == main_handle_ref.job_id;
let other_handle_ref_opt = other_handles.iter_mut().find(|h| h.job_id == *id);
let handle = if is_main {
&mut main_handle_ref
} else {
&mut other_handles.iter_mut().find(|h| h.job_id == *id).unwrap()
&mut (*other_handle_ref_opt.unwrap())
};
match handle.chan.try_recv() {
Err(_) => { /* Job was canceled */ }