net: Make most of the resource task messages serializable.

This commit is contained in:
Patrick Walton 2015-07-09 16:18:38 -07:00
parent 7e77285745
commit 9c9d7dc93b
15 changed files with 373 additions and 105 deletions

View file

@ -248,10 +248,10 @@ impl ImageCache {
pending_load.bytes.push_all(&data);
}
ResponseAction::ResponseComplete(result) => {
match result {
match *result {
Ok(()) => {
let pending_load = self.pending_loads.get_mut(&msg.url).unwrap();
pending_load.result = Some(result);
pending_load.result = Some((*result).clone());
let bytes = mem::replace(&mut pending_load.bytes, vec!());
let url = msg.url.clone();