mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove compositor dependency on net crate.
Move the ImageCacheTaskClient trait and impl to net_traits. Fixes #5551.
This commit is contained in:
parent
c9a413cb6e
commit
a1d7456307
3 changed files with 13 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue