|
|
|
@ -43,10 +43,8 @@ async fn process_next_result(mut actor: ClientActor, result: ClientTaskResult) - |
|
|
|
Download { ref uri, ref state, ref message, .. } => {
|
|
|
|
info!("Done download: {:?}", uri);
|
|
|
|
if let Some((_, message)) = actor.actions.remove_entry(message) {
|
|
|
|
use ClientActorMessage::Download;
|
|
|
|
|
|
|
|
match message {
|
|
|
|
Download { respond_to, .. } => {
|
|
|
|
ClientActorMessage::Download { respond_to, .. } => {
|
|
|
|
let _ = respond_to.send(Ok(state.clone()));
|
|
|
|
},
|
|
|
|
_ => panic!("Wrong variant ... this should never happen"),
|
|
|
|
@ -59,9 +57,8 @@ async fn process_next_result(mut actor: ClientActor, result: ClientTaskResult) - |
|
|
|
GetData { ref uri, ref buffer, ref message } => {
|
|
|
|
info!("Done get_data: {:?}", uri);
|
|
|
|
if let Some((_, message)) = actor.actions.remove_entry(message) {
|
|
|
|
use ClientActorMessage::GetData;
|
|
|
|
match message {
|
|
|
|
GetData { respond_to, .. } => {
|
|
|
|
ClientActorMessage::GetData { respond_to, .. } => {
|
|
|
|
let _ = respond_to.send(buffer.clone());
|
|
|
|
},
|
|
|
|
_ => panic!("Wrong variant ... this should never happen"),
|
|
|
|
|