mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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.
|
||||
pub trait ScriptChan: JSTraceable {
|
||||
/// Send a message to the associated event loop.
|
||||
#[allow(clippy::result_unit_err)]
|
||||
fn send(&self, msg: CommonScriptMsg) -> Result<(), ()>;
|
||||
/// Clone this handle.
|
||||
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
|
||||
/// different Receiver interfaces.
|
||||
pub trait ScriptPort {
|
||||
#[allow(clippy::result_unit_err)]
|
||||
fn recv(&self) -> Result<CommonScriptMsg, ()>;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue