clippy: Fix option_map_unit_fn warnings (#31906)

This commit is contained in:
Oluwatobi Sofela 2024-03-27 19:43:56 +01:00 committed by GitHub
parent a5bcae212a
commit da76ebabe9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 43 additions and 30 deletions

View file

@ -1432,23 +1432,21 @@ impl HTMLMediaElement {
match msg {
GLPlayerMsgForward::Lock(sender) => {
video_renderer
if let Some(holder) = video_renderer
.lock()
.unwrap()
.current_frame_holder
.as_mut()
.map(|holder| {
.as_mut() {
holder.lock();
sender.send(holder.get()).unwrap();
});
};
},
GLPlayerMsgForward::Unlock() => {
video_renderer
if let Some(holder) = video_renderer
.lock()
.unwrap()
.current_frame_holder
.as_mut()
.map(|holder| holder.unlock());
.as_mut() { holder.unlock() }
},
_ => (),
}