Fix clippy warnings (#214)
* Fix clippy warnings * Fix implicitly elided lifetimes
This commit is contained in:
@@ -28,7 +28,7 @@ pub enum TrackCommand {
|
||||
/// Register an event on this track.
|
||||
AddEvent(EventData),
|
||||
/// Run some closure on this track, with direct access to the core object.
|
||||
Do(Box<dyn FnOnce(View) -> Option<Action> + Send + Sync + 'static>),
|
||||
Do(Box<dyn FnOnce(View<'_>) -> Option<Action> + Send + Sync + 'static>),
|
||||
/// Request a copy of this track's state.
|
||||
Request(Sender<TrackState>),
|
||||
/// Change the loop count/strategy of this track.
|
||||
|
||||
@@ -150,7 +150,7 @@ impl TrackHandle {
|
||||
/// [`Metadata`]: crate::input::Metadata
|
||||
pub fn action<F>(&self, action: F) -> TrackResult<()>
|
||||
where
|
||||
F: FnOnce(View) -> Option<Action> + Send + Sync + 'static,
|
||||
F: FnOnce(View<'_>) -> Option<Action> + Send + Sync + 'static,
|
||||
{
|
||||
self.send(TrackCommand::Do(Box::new(action)))
|
||||
}
|
||||
|
||||
@@ -193,8 +193,8 @@ impl TrackQueue {
|
||||
|
||||
pub(crate) async fn get_preload_time(track: &mut Track) -> Option<Duration> {
|
||||
let meta = match track.input {
|
||||
Input::Lazy(ref mut rec) => rec.aux_metadata().await.ok(),
|
||||
Input::Live(_, Some(ref mut rec)) => rec.aux_metadata().await.ok(),
|
||||
Input::Lazy(ref mut rec) | Input::Live(_, Some(ref mut rec)) =>
|
||||
rec.aux_metadata().await.ok(),
|
||||
Input::Live(_, None) => None,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user