mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
fix test suite
This commit is contained in:
parent
43ccfff24a
commit
acfaf757ec
4 changed files with 24 additions and 29 deletions
|
|
@ -1,8 +1,7 @@
|
|||
use tek_midi::*;
|
||||
use tek_tui::tek_input::*;
|
||||
use std::sync::*;
|
||||
|
||||
struct ExampleClips(Arc<RwLock<Vec<Arc<RwLock<MidiClip>>>>>);
|
||||
|
||||
impl HasClips for ExampleClips {
|
||||
fn clips (&self) -> RwLockReadGuard<'_, Vec<Arc<RwLock<MidiClip>>>> {
|
||||
self.0.read().unwrap()
|
||||
|
|
@ -11,9 +10,8 @@ impl HasClips for ExampleClips {
|
|||
self.0.write().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn main () -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut clips = ExampleClips(Arc::new(vec![].into()));
|
||||
PoolClipCommand::Import(0, String::from("./example.mid")).execute(&mut clips)?;
|
||||
PoolClipCommand::Import(0, std::path::PathBuf::from("./example.mid")).execute(&mut clips)?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue