diff --git a/src/tracks/command.rs b/src/tracks/command.rs index 5883199..1139512 100644 --- a/src/tracks/command.rs +++ b/src/tracks/command.rs @@ -26,8 +26,8 @@ pub enum TrackCommand { AddEvent(EventData), /// Run some closure on this track, with direct access to the core object. Do(Box), - /// Request a read-only view of this track's state. - Request(Sender>), + /// Request a copy of this track's state. + Request(Sender), /// Change the loop count/strategy of this track. Loop(LoopState), /// Prompts a track's input to become live and usable, if it is not already. diff --git a/src/tracks/handle.rs b/src/tracks/handle.rs index 89ea214..6d08ce4 100644 --- a/src/tracks/handle.rs +++ b/src/tracks/handle.rs @@ -162,7 +162,7 @@ impl TrackHandle { } /// Request playback information and state from the audio context. - pub async fn get_info(&self) -> TrackResult> { + pub async fn get_info(&self) -> TrackResult { let (tx, rx) = flume::bounded(1); self.send(TrackCommand::Request(tx))?; diff --git a/src/tracks/mod.rs b/src/tracks/mod.rs index 580ab57..90ac096 100644 --- a/src/tracks/mod.rs +++ b/src/tracks/mod.rs @@ -294,7 +294,7 @@ impl Track { )); }, Request(tx) => { - let _ = tx.send(Box::new(self.state())); + let _ = tx.send(self.state()); }, Loop(loops) => if self.set_loops(loops).is_ok() {