Update some code that's feature-gated under core.

This commit is contained in:
Ms2ger 2015-03-21 18:44:39 +01:00
parent 29a36adbe7
commit ba87666cdb
33 changed files with 104 additions and 107 deletions

View file

@ -316,7 +316,7 @@ impl ImageCache {
debug!("image_cache_task: started image decode for {}", url.serialize());
let image = profile(time::TimeProfilerCategory::ImageDecoding,
None, time_profiler_chan, || {
load_from_memory(data.as_slice())
load_from_memory(&data)
});
let image = image.map(|image| Arc::new(box image));
@ -456,7 +456,7 @@ fn load_image_data(url: Url, resource_task: ResourceTask) -> Result<Vec<u8>, ()>
loop {
match progress_port.recv().unwrap() {
Payload(data) => {
image_data.push_all(data.as_slice());
image_data.push_all(&data);
}
Done(Ok(..)) => {
return Ok(image_data);