Remove compositor dependency on net crate.

Move the ImageCacheTaskClient trait and impl to net_traits. Fixes #5551.
This commit is contained in:
Aneesh Agrawal 2015-04-07 01:20:38 -04:00
parent c9a413cb6e
commit a1d7456307
3 changed files with 13 additions and 14 deletions

View file

@ -395,18 +395,6 @@ impl ImageCache {
}
}
pub trait ImageCacheTaskClient {
fn exit(&self);
}
impl ImageCacheTaskClient for ImageCacheTask {
fn exit(&self) {
let (response_chan, response_port) = channel();
self.send(Msg::Exit(response_chan));
response_port.recv().unwrap();
}
}
pub fn spawn_listener<F, A>(f: F) -> Sender<A>
where F: FnOnce(Receiver<A>) + Send + 'static,
A: Send + 'static