Skip to content

Commit

Permalink
cargo fmt; make test predictable
Browse files Browse the repository at this point in the history
Events with same timestamp may go in different orders.
  • Loading branch information
PetrGlad committed Nov 22, 2023
1 parent b5244db commit 60a75b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/audio_setup.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::sync::{Arc, mpsc, Mutex};
use std::sync::mpsc::Sender;
use std::sync::{mpsc, Arc, Mutex};

use cpal::{BufferSize, StreamConfig};
use cpal::SampleFormat::F32;
use cpal::traits::{DeviceTrait, HostTrait};
use cpal::SampleFormat::F32;
use cpal::{BufferSize, StreamConfig};
use midir::{MidiInput, MidiInputConnection};
use midly::live::LiveEvent;
use rodio::OutputStream;
Expand Down
4 changes: 2 additions & 2 deletions src/midi.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::collections::BinaryHeap;
use std::time::Duration;

use midly::{Format, Header, MidiMessage, Smf, Timing, Track, TrackEvent};
use midly::io::WriteResult;
use midly::live::LiveEvent;
use midly::MidiMessage::Controller;
use midly::num::u15;
use midly::MidiMessage::Controller;
use midly::{Format, Header, MidiMessage, Smf, Timing, Track, TrackEvent};

use crate::common::Time;
use crate::engine::{EngineEvent, EventSource};
Expand Down
2 changes: 1 addition & 1 deletion src/track_edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ mod tests {
fn check_set_damper_to() {
let mut track = make_test_track();
let mut changeset = Changeset::empty();
set_damper_to(&mut track, &mut changeset, (14, 17), true);
set_damper_to(&mut track, &mut changeset, (13, 17), true);
track.patch(&changeset);

let expected_ids: Vec<EventId> = vec![10, 0, 20, 30, 1, 40];
Expand Down

0 comments on commit 60a75b2

Please sign in to comment.