Make ProgressMsg use Vec.

This commit is contained in:
Ms2ger 2014-04-26 14:37:02 +02:00
parent cc7d04702d
commit 6e617d8eba
9 changed files with 27 additions and 24 deletions

View file

@ -104,7 +104,8 @@ fn load(mut url: Url, start_chan: Sender<LoadResponse>) {
match response.read(buf) {
Ok(len) => {
unsafe { buf.set_len(len); }
progress_chan.send(Payload(buf));
let buf: ~[u8] = buf;
progress_chan.send(Payload(buf.move_iter().collect()));
}
Err(_) => {
progress_chan.send(Done(Ok(())));