Auto merge of #5642 - aneeshusa:arc-box-image-to-arc-image, r=Ms2ger

Image used to be a trait, but no longer is, so boxing it is no longer
necessary. Fixes #5639.
This commit is contained in:
bors-servo 2015-04-14 01:57:07 -05:00
commit b7f59a3646
7 changed files with 13 additions and 13 deletions

View file

@ -110,7 +110,7 @@ enum ImageState {
Prefetching(AfterPrefetch),
Prefetched(Vec<u8>),
Decoding,
Decoded(Arc<Box<Image>>),
Decoded(Arc<Image>),
Failed
}
@ -303,7 +303,7 @@ impl ImageCache {
load_from_memory(&data)
});
let image = image.map(|image| Arc::new(box image));
let image = image.map(Arc::new);
to_cache.send(Msg::StoreImage(url.clone(), image)).unwrap();
debug!("image_cache_task: ended image decode for {}", url.serialize());
});
@ -317,7 +317,7 @@ impl ImageCache {
}
}
fn store_image(&mut self, url: Url, image: Option<Arc<Box<Image>>>) {
fn store_image(&mut self, url: Url, image: Option<Arc<Image>>) {
match self.get_state(&url) {
ImageState::Decoding => {