async_client: Don't double pin futures.

master
Damir Jelić 2019-10-24 22:35:36 +02:00
parent 8c681c362a
commit 69a18e9d3a
1 changed files with 1 additions and 2 deletions

View File

@ -244,8 +244,7 @@ impl AsyncClient {
if self.event_callbacks.contains_key(&event_type) { if self.event_callbacks.contains_key(&event_type) {
let cb = self.event_callbacks.get_mut(&event_type).unwrap(); let cb = self.event_callbacks.get_mut(&event_type).unwrap();
let future = Pin::from(cb(event.clone())); cb(event.clone()).await;
future.await;
} }
} }
} }