PollParameters is now a trait (#1177)

* PollParameters is now a trait

* Fix unused variable
This commit is contained in:
Pierre Krieger
2019-06-18 10:23:26 +02:00
committed by GitHub
parent 78d6f44e46
commit b6378ac526
11 changed files with 93 additions and 40 deletions

View File

@ -116,7 +116,7 @@ where
self.events.push_front(PingEvent { peer, result })
}
fn poll(&mut self, _: &mut PollParameters<'_>) -> Async<NetworkBehaviourAction<Void, PingEvent>>
fn poll(&mut self, _: &mut impl PollParameters) -> Async<NetworkBehaviourAction<Void, PingEvent>>
{
if let Some(e) = self.events.pop_back() {
Async::Ready(NetworkBehaviourAction::GenerateEvent(e))