test: fix coverage run

This commit is contained in:
🪞👃🪞 2025-04-26 13:31:09 +03:00
parent 24bc33d3d0
commit 2c59b1acfd
6 changed files with 58 additions and 58 deletions

View file

@ -287,14 +287,14 @@ pub trait HasScenes: HasSelection + HasEditor + Send + Sync {
impl Scene {
/// Returns the pulse length of the longest clip in the scene
fn pulses (&self) -> usize {
pub fn pulses (&self) -> usize {
self.clips.iter().fold(0, |a, p|{
a.max(p.as_ref().map(|q|q.read().unwrap().length).unwrap_or(0))
})
}
/// Returns true if all clips in the scene are
/// currently playing on the given collection of tracks.
fn is_playing (&self, tracks: &[Track]) -> bool {
pub fn is_playing (&self, tracks: &[Track]) -> bool {
self.clips.iter().any(|clip|clip.is_some()) && self.clips.iter().enumerate()
.all(|(track_index, clip)|match clip {
Some(c) => tracks