Fixed the .clone() warnings. (#31819)

This commit is contained in:
Aarya Khandelwal 2024-03-22 11:11:17 +05:30 committed by GitHub
parent 95e69fe4ff
commit 9b26dca141
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 76 additions and 93 deletions

View file

@ -1357,7 +1357,7 @@ impl HTMLMediaElement {
HTMLMediaElementTypeId::HTMLVideoElement => Some(self.video_renderer.clone()),
};
let audio_renderer = self.audio_renderer.borrow().as_ref().map(|r| r.clone());
let audio_renderer = self.audio_renderer.borrow().as_ref().cloned();
let pipeline_id = window.pipeline_id();
let client_context_id =
@ -2470,7 +2470,7 @@ impl LayoutHTMLMediaElementHelpers for LayoutDom<'_, HTMLMediaElement> {
fn data(self) -> HTMLMediaData {
let media = unsafe { &*self.unsafe_get() };
HTMLMediaData {
current_frame: media.video_renderer.lock().unwrap().current_frame.clone(),
current_frame: media.video_renderer.lock().unwrap().current_frame,
}
}
}