diff --git a/playback/src/player.rs b/playback/src/player.rs index afd79a58..7fdf416e 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -177,7 +177,7 @@ impl PlayerState { match mem::replace(self, Invalid) { Playing { track_id, end_of_track, ..} => { end_of_track.send(()); - let old_state = mem::replace(self, EndOfTrack { track_id }); + *self = EndOfTrack { track_id }; }, _ => panic!("Called playing_to_end_of_track in non-playing state.") }