diff options
author | eri <eri@inventati.org> | 2024-03-05 19:19:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 18:19:04 +0000 |
commit | 3552bb2464cbaa57facbcb9ad2bcb266bc5a87f6 (patch) | |
tree | e2a91e49e76dbf6a01a7248cad62e1503ea64a50 /components/devtools/lib.rs | |
parent | da873779b496c9a1236cd92388efb1316f97e3d6 (diff) | |
download | servo-3552bb2464cbaa57facbcb9ad2bcb266bc5a87f6.tar.gz servo-3552bb2464cbaa57facbcb9ad2bcb266bc5a87f6.zip |
clippy: Fix several warnings in components/devtools (#31501)
Diffstat (limited to 'components/devtools/lib.rs')
-rw-r--r-- | components/devtools/lib.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/components/devtools/lib.rs b/components/devtools/lib.rs index 5ed2111ee6e..a51b8b7612d 100644 --- a/components/devtools/lib.rs +++ b/components/devtools/lib.rs @@ -10,6 +10,7 @@ #![crate_name = "devtools"] #![crate_type = "rlib"] #![allow(non_snake_case)] +#![allow(clippy::too_many_arguments)] #![deny(unsafe_code)] use std::borrow::ToOwned; @@ -135,7 +136,7 @@ fn run_server( port: u16, embedder: EmbedderProxy, ) { - let bound = TcpListener::bind(&("0.0.0.0", port)).ok().and_then(|l| { + let bound = TcpListener::bind(("0.0.0.0", port)).ok().and_then(|l| { l.local_addr() .map(|addr| addr.port()) .ok() @@ -259,7 +260,7 @@ fn run_server( Some(bc) => bc, None => return, }; - let name = match browsing_contexts.get(&bc) { + let name = match browsing_contexts.get(bc) { Some(name) => name, None => return, }; @@ -299,7 +300,7 @@ fn run_server( name: worker_name.clone(), console: console_name.clone(), thread: thread_name, - id: id, + id, url: page_info.url.clone(), type_: WorkerType::Dedicated, script_chan: script_sender, @@ -324,7 +325,7 @@ fn run_server( page_info, pipeline, script_sender, - &mut *actors, + &mut actors, ); let name = browsing_context_actor.name(); browsing_contexts.insert(browsing_context, name.clone()); @@ -366,7 +367,7 @@ fn run_server( let actors = actors.lock().unwrap(); let console_actor = actors.find::<ConsoleActor>(&console_actor_name); let id = worker_id.map_or(UniqueId::Pipeline(id), UniqueId::Worker); - console_actor.handle_page_error(page_error, id, &*actors); + console_actor.handle_page_error(page_error, id, &actors); } fn handle_console_message( @@ -392,7 +393,7 @@ fn run_server( let actors = actors.lock().unwrap(); let console_actor = actors.find::<ConsoleActor>(&console_actor_name); let id = worker_id.map_or(UniqueId::Pipeline(id), UniqueId::Worker); - console_actor.handle_console_api(console_message, id, &*actors); + console_actor.handle_console_api(console_message, id, &actors); } fn find_console_actor( |