diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs index eb8983f9d10..3cad32435b0 100644 --- a/components/net_traits/lib.rs +++ b/components/net_traits/lib.rs @@ -379,9 +379,8 @@ pub fn fetch_async(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(); }