Fix borrowing error in work editor

This commit is contained in:
Elias Projahn 2021-06-07 22:40:14 +02:00
parent cec955eb9f
commit 863c9d19c3

View file

@ -205,7 +205,8 @@ impl Screen<Option<Work>, 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 = {