mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Update some code that's feature-gated under core.
This commit is contained in:
parent
29a36adbe7
commit
ba87666cdb
33 changed files with 104 additions and 107 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue