mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
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:
commit
b7f59a3646
7 changed files with 13 additions and 13 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue