Fix more clippy (#32740)

This commit is contained in:
石蕊 (Pi-Cla) 2024-07-09 04:47:43 +00:00 committed by GitHub
parent 4e1f623666
commit f29dd64a7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 72 additions and 90 deletions

View file

@ -157,14 +157,12 @@ impl Actor for BrowsingContextActor {
fn handle_message(
&self,
_registry: &ActorRegistry,
msg_type: &str,
_msg_type: &str,
_msg: &Map<String, Value>,
_stream: &mut TcpStream,
_id: StreamId,
) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
_ => ActorMessageStatus::Ignored,
})
Ok(ActorMessageStatus::Ignored)
}
fn cleanup(&self, id: StreamId) {

View file

@ -193,11 +193,8 @@ impl Actor for WatcherActor {
let target =
registry.find::<BrowsingContextActor>(&self.browsing_context_actor);
match resource {
"document-event" => {
target.document_event(stream);
},
_ => {},
if resource == "document-event" {
target.document_event(stream);
}
let _ = stream.write_json_packet(&EmptyReplyMsg { from: self.name() });