mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
18 lines
446 B
Text
18 lines
446 B
Text
use tek::*;
|
|
|
|
struct ExamplePhrases(Vec<Arc<RwLock<Phrase>>>);
|
|
|
|
impl HasPhrases for ExamplePhrases {
|
|
fn phrases (&self) -> &Vec<Arc<RwLock<Phrase>>> {
|
|
&self.0
|
|
}
|
|
fn phrases_mut (&mut self) -> &mut Vec<Arc<RwLock<Phrase>>> {
|
|
&mut self.0
|
|
}
|
|
}
|
|
|
|
fn main () -> Usually<()> {
|
|
let mut phrases = ExamplePhrases(vec![]);
|
|
PhrasePoolCommand::Import(0, String::from("./example.mid")).execute(&mut phrases)?;
|
|
Ok(())
|
|
}
|