mirror of
https://github.com/servo/servo
synced 2026-05-03 04:42:17 +02:00
script: Clean-up IpcSend .sender().send() pattern (#38919)
The IpcSend trait defines a `send()` method, so doing .sender().send() seems like it just adds a useless clone of the sender, when we could just `send()` directly. This only cleans up the direct usages of this pattern, there are more instances, where a helper method is defined, which returns the IpcSender, and the only usages also just directly call send. Testing: No functional changes Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ddf5f1eb2f
commit
b9dc228e51
@@ -356,12 +356,7 @@ impl WindowProxy {
|
||||
dest: response.new_webview_id,
|
||||
};
|
||||
|
||||
document
|
||||
.global()
|
||||
.resource_threads()
|
||||
.sender()
|
||||
.send(msg)
|
||||
.unwrap();
|
||||
document.global().resource_threads().send(msg).unwrap();
|
||||
receiver.recv().unwrap();
|
||||
}
|
||||
Some(new_window_proxy)
|
||||
|
||||
Reference in New Issue
Block a user