mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
remodularize 3
This commit is contained in:
parent
d38dc14e84
commit
113e7b0bad
24 changed files with 262 additions and 370 deletions
|
|
@ -15,7 +15,7 @@ pub trait HasPhrases {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum PhrasePoolCommand {
|
||||
pub enum MidiPoolCommand {
|
||||
Add(usize, MidiClip),
|
||||
Delete(usize),
|
||||
Swap(usize, usize),
|
||||
|
|
@ -26,9 +26,9 @@ pub enum PhrasePoolCommand {
|
|||
SetColor(usize, ItemColor),
|
||||
}
|
||||
|
||||
impl<T: HasPhrases> Command<T> for PhrasePoolCommand {
|
||||
impl<T: HasPhrases> Command<T> for MidiPoolCommand {
|
||||
fn execute (self, model: &mut T) -> Perhaps<Self> {
|
||||
use PhrasePoolCommand::*;
|
||||
use MidiPoolCommand::*;
|
||||
Ok(match self {
|
||||
Add(mut index, phrase) => {
|
||||
let phrase = Arc::new(RwLock::new(phrase));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue