Skip to content

Commit

Permalink
macos: Fix Clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinono3 committed Jan 7, 2025
1 parent c5761cb commit 5ebd0ae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/platform/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,10 @@ unsafe fn attach_command_handlers(handler: Arc<dyn Fn(MediaControlEvent)>) {
let handler = handler.clone();
// event of type MPChangePlaybackPositionCommandEvent
move |event: id| -> NSInteger {
let position = event
let position = *event
.as_ref()
.unwrap()
.get_ivar::<f64>("_positionTime")
.clone();
.get_ivar::<f64>("_positionTime");
(handler)(MediaControlEvent::SetPosition(MediaPosition(
Duration::from_secs_f64(position),
)));
Expand Down

0 comments on commit 5ebd0ae

Please sign in to comment.