remodularize 3

This commit is contained in:
🪞👃🪞 2025-01-08 19:40:06 +01:00
parent d38dc14e84
commit 113e7b0bad
24 changed files with 262 additions and 370 deletions

View file

@ -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));