From 863c9d19c3e504925e63cfb8a866fc154a0ef3eb Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Mon, 7 Jun 2021 22:40:14 +0200 Subject: [PATCH] Fix borrowing error in work editor --- musicus/src/editors/work.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/musicus/src/editors/work.rs b/musicus/src/editors/work.rs index 4f2b2c9..c13a256 100644 --- a/musicus/src/editors/work.rs +++ b/musicus/src/editors/work.rs @@ -205,7 +205,8 @@ impl Screen, Work> for WorkEditor { edit_button.connect_clicked(clone!(@weak this => move |_| { spawn!(@clone this, async move { - match this.structure.borrow()[index].clone() { + let part_or_section = this.structure.borrow()[index].clone(); + match part_or_section { PartOrSection::Part(part) => { if let Some(part) = push!(this.handle, WorkPartEditor, Some(part)).await { let length = {