mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
clippy: fix clippy warnings in components/script
(#33849)
* Clippy:Fix clippy warnings in components/script Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com> * Addressed changes suggested in #33849 Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com> --------- Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
This commit is contained in:
parent
30abb99287
commit
0a71c736f0
2 changed files with 3 additions and 0 deletions
|
@ -124,6 +124,7 @@ impl fmt::Debug for CommonScriptMsg {
|
||||||
/// A cloneable interface for communicating with an event loop.
|
/// A cloneable interface for communicating with an event loop.
|
||||||
pub trait ScriptChan: JSTraceable {
|
pub trait ScriptChan: JSTraceable {
|
||||||
/// Send a message to the associated event loop.
|
/// Send a message to the associated event loop.
|
||||||
|
#[allow(clippy::result_unit_err)]
|
||||||
fn send(&self, msg: CommonScriptMsg) -> Result<(), ()>;
|
fn send(&self, msg: CommonScriptMsg) -> Result<(), ()>;
|
||||||
/// Clone this handle.
|
/// Clone this handle.
|
||||||
fn clone(&self) -> Box<dyn ScriptChan + Send>;
|
fn clone(&self) -> Box<dyn ScriptChan + Send>;
|
||||||
|
@ -164,6 +165,7 @@ pub enum ScriptThreadEventCategory {
|
||||||
/// APIs that need to abstract over multiple kinds of event loops (worker/main thread) with
|
/// APIs that need to abstract over multiple kinds of event loops (worker/main thread) with
|
||||||
/// different Receiver interfaces.
|
/// different Receiver interfaces.
|
||||||
pub trait ScriptPort {
|
pub trait ScriptPort {
|
||||||
|
#[allow(clippy::result_unit_err)]
|
||||||
fn recv(&self) -> Result<CommonScriptMsg, ()>;
|
fn recv(&self) -> Result<CommonScriptMsg, ()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,7 @@ impl InProgressLoad {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
enum MixedMessage {
|
enum MixedMessage {
|
||||||
FromConstellation(ConstellationControlMsg),
|
FromConstellation(ConstellationControlMsg),
|
||||||
FromScript(MainThreadScriptMsg),
|
FromScript(MainThreadScriptMsg),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue