From 911a4a80eb7e4d98a96b813ebff3e659d50f040c Mon Sep 17 00:00:00 2001 From: thajohns Date: Thu, 9 Sep 2021 01:16:04 -0400 Subject: formatted some more --- src/seq/sequencer.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/seq/sequencer.rs') diff --git a/src/seq/sequencer.rs b/src/seq/sequencer.rs index 753a2f1..deedc4b 100644 --- a/src/seq/sequencer.rs +++ b/src/seq/sequencer.rs @@ -1,6 +1,6 @@ -use super::{NoteStream, Note, IV}; +use super::{Note, NoteStream, IV}; -pub fn coalesce<'a, I: Iterator>(stream_iter: I) -> NoteStream { +pub fn coalesce<'a, I: Iterator>(stream_iter: I) -> NoteStream { let mut output = NoteStream::new(); for ns in stream_iter { @@ -16,13 +16,15 @@ pub struct SchedParams { impl Default for SchedParams { fn default() -> SchedParams { - SchedParams { - epsilon: 0.0, - } + SchedParams { epsilon: 0.0 } } } -pub fn schedule<'a, 'b: 'a, I: Iterator, F: FnMut(&'a Note) -> Option<&'b str>>(notes: I, mut classifier: F, params: &SchedParams) -> IV { +pub fn schedule<'a, 'b: 'a, I: Iterator, F: FnMut(&'a Note) -> Option<&'b str>>( + notes: I, + mut classifier: F, + params: &SchedParams, +) -> IV { let mut output: IV = Default::default(); for note in notes { @@ -41,7 +43,7 @@ pub fn schedule<'a, 'b: 'a, I: Iterator, F: FnMut(&'a Note) -> Op if ns.len() > 0 { let nt = &ns[ns.len() - 1]; if note.time.0 < nt.time.0 + nt.dur.0 + params.epsilon { - continue + continue; } } found = Some(idx); -- cgit v1.2.3-70-g09d2