Fix out-of-range move commands

This commit is contained in:
Joscha 2021-12-12 19:09:38 +00:00
parent 240becd28d
commit 6f1a533b95
4 changed files with 39 additions and 3 deletions

View file

@ -325,6 +325,13 @@ impl Command {
Self::Note(note) => &note.desc,
}
}
pub fn statements(&self) -> &[Statement] {
match self {
Self::Task(task) => &task.statements,
Self::Note(note) => &note.statements,
}
}
}
#[derive(Debug)]