mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Reformat fetch_async().
This commit is contained in:
parent
410e5c6d6f
commit
22f85bfed6
1 changed files with 2 additions and 3 deletions
|
@ -379,9 +379,8 @@ pub fn fetch_async<F>(request: RequestInit,
|
|||
where F: Fn(FetchResponseMsg) + Send + 'static
|
||||
{
|
||||
let (action_sender, action_receiver) = ipc::channel().unwrap();
|
||||
ROUTER.add_route(action_receiver.to_opaque(), box move |message| {
|
||||
f(message.to().unwrap());
|
||||
});
|
||||
ROUTER.add_route(action_receiver.to_opaque(),
|
||||
box move |message| f(message.to().unwrap()));
|
||||
core_resource_thread.send(CoreResourceMsg::Fetch(request, action_sender)).unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue