mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
clippy: fix warnings in various modules in components (#31568)
* clippy: fix warnings in various modules in components * fix: unit tests * fix: build on android * fix: all samplers use new_boxed
This commit is contained in:
parent
19f1f2a8f4
commit
3a5ca785d3
24 changed files with 107 additions and 118 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
#![allow(clippy::type_complexity)]
|
||||
|
||||
mod media_channel;
|
||||
mod media_thread;
|
||||
|
|
|
@ -74,6 +74,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)] // It is an alias to the underlying module
|
||||
pub fn to_opaque(self) -> ipc_channel::ipc::OpaqueIpcReceiver {
|
||||
match self {
|
||||
GLPlayerReceiver::Ipc(receiver) => receiver.to_opaque(),
|
||||
|
|
|
@ -79,14 +79,14 @@ impl GLPlayerThread {
|
|||
}
|
||||
},
|
||||
GLPlayerMsg::Lock(id, handler_sender) => {
|
||||
self.players.get(&id).map(|sender| {
|
||||
if let Some(sender) = self.players.get(&id) {
|
||||
sender.send(GLPlayerMsgForward::Lock(handler_sender)).ok();
|
||||
});
|
||||
}
|
||||
},
|
||||
GLPlayerMsg::Unlock(id) => {
|
||||
self.players.get(&id).map(|sender| {
|
||||
if let Some(sender) = self.players.get(&id) {
|
||||
sender.send(GLPlayerMsgForward::Unlock()).ok();
|
||||
});
|
||||
}
|
||||
},
|
||||
GLPlayerMsg::Exit => return true,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue