aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/image_cache_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/image_cache_task.rs')
-rw-r--r--components/net/image_cache_task.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/net/image_cache_task.rs b/components/net/image_cache_task.rs
index de0c978c3cf..cf0cb9a0bd2 100644
--- a/components/net/image_cache_task.rs
+++ b/components/net/image_cache_task.rs
@@ -76,7 +76,7 @@ impl<E, S: Encoder<E>> Encodable<S, E> for ImageCacheTask {
}
}
-type DecoderFactory = fn() -> proc(&[u8]) -> Option<Image>;
+type DecoderFactory = fn() -> (proc(&[u8]) : 'static -> Option<Image>);
impl ImageCacheTask {
pub fn new(resource_task: ResourceTask) -> ImageCacheTask {
@@ -464,7 +464,7 @@ fn load_image_data(url: Url, resource_task: ResourceTask) -> Result<Vec<u8>, ()>
image_data.push_all(data.as_slice());
}
resource_task::Done(result::Ok(..)) => {
- return Ok(image_data.move_iter().collect());
+ return Ok(image_data.into_iter().collect());
}
resource_task::Done(result::Err(..)) => {
return Err(());