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:
komuhangi 2024-10-16 13:21:25 +03:00 committed by GitHub
parent 30abb99287
commit 0a71c736f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -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, ()>;
}