mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clippy: Fix warnings in components/shared
(#31627)
* clippy: fix warnings in `components/shared` * fix: formatting derive * fix: rename new to default
This commit is contained in:
parent
4efebf1e62
commit
21939c2ba8
11 changed files with 36 additions and 50 deletions
|
@ -63,7 +63,7 @@ impl MessagePortImpl {
|
|||
|
||||
/// Maybe get the Id of the entangled port.
|
||||
pub fn entangled_port_id(&self) -> Option<MessagePortId> {
|
||||
self.entangled_port.clone()
|
||||
self.entangled_port
|
||||
}
|
||||
|
||||
/// Entanged this port with another.
|
||||
|
@ -73,10 +73,7 @@ impl MessagePortImpl {
|
|||
|
||||
/// Is this port enabled?
|
||||
pub fn enabled(&self) -> bool {
|
||||
match self.state {
|
||||
MessagePortState::Enabled(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self.state, MessagePortState::Enabled(_))
|
||||
}
|
||||
|
||||
/// Mark this port as having been shipped.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue