mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-31 00:41:59 +00:00
add poll parameters to custom poll function (#1442)
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
@@ -130,7 +130,7 @@ fn custom_polling() {
|
||||
}
|
||||
|
||||
impl Foo {
|
||||
fn foo<T>(&mut self, _: &mut std::task::Context) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, ()>> { std::task::Poll::Pending }
|
||||
fn foo<T>(&mut self, _: &mut std::task::Context, _: &mut impl libp2p::swarm::PollParameters) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, ()>> { std::task::Poll::Pending }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
@@ -186,7 +186,7 @@ fn custom_event_and_polling() {
|
||||
}
|
||||
|
||||
impl Foo {
|
||||
fn foo<T>(&mut self, _: &mut std::task::Context) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, String>> { std::task::Poll::Pending }
|
||||
fn foo<T>(&mut self, _: &mut std::task::Context, _: &mut impl libp2p::swarm::PollParameters) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, String>> { std::task::Poll::Pending }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
Reference in New Issue
Block a user