egui/top: get rid of unnecessary .clone()s

This commit is contained in:
Alain Emilia Anna Zscheile 2024-09-28 21:22:59 +02:00
parent e6eae238be
commit ea8c525e1f
1 changed files with 2 additions and 2 deletions

View File

@ -234,7 +234,7 @@ impl Top {
} else if export_session.consume_key_triggered(ctx, ui) {
if let Some(design) = maybe_design {
if let Some(invoker) =
arc_mutex_maybe_invoker.clone().lock().unwrap().as_ref()
arc_mutex_maybe_invoker.lock().unwrap().as_ref()
{
let ctx = ui.ctx().clone();
let board = invoker.autorouter().board();
@ -274,7 +274,7 @@ impl Top {
}
});
} else if export_history.consume_key_triggered(ctx, ui) {
if let Some(invoker) = arc_mutex_maybe_invoker.clone().lock().unwrap().as_ref()
if let Some(invoker) = arc_mutex_maybe_invoker.lock().unwrap().as_ref()
{
let ctx = ctx.clone();
let task = rfd::AsyncFileDialog::new().save_file();