compose/gpg.rs: Fix msrv regression
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
This commit is contained in:
parent
ed85da51df
commit
192ecea2a4
1 changed files with 2 additions and 1 deletions
|
@ -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 */ }
|
||||
|
|
Loading…
Add table
Reference in a new issue