mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-02 14:12:18 +00:00
Err, fix wrong foo functions
This commit is contained in:
parent
213c633b92
commit
18bcba94e7
@ -130,11 +130,11 @@ fn custom_polling() {
|
||||
}
|
||||
|
||||
impl<TSubstream> Foo<TSubstream> {
|
||||
fn foo<T>(&mut self) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, ()>> { std::task::Poll::Pending }
|
||||
fn foo<T>(&mut self, _: &mut std::task::Context) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, ()>> { std::task::Poll::Pending }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn foo<TSubstream: libp2p::futures::AsyncRead + libp2p::futures::AsyncWrite + Send + Unpin + 'static>(_: &mut std::task::Context) {
|
||||
fn foo<TSubstream: libp2p::futures::AsyncRead + libp2p::futures::AsyncWrite + Send + Unpin + 'static>() {
|
||||
require_net_behaviour::<Foo<TSubstream>>();
|
||||
}
|
||||
}
|
||||
@ -186,11 +186,11 @@ fn custom_event_and_polling() {
|
||||
}
|
||||
|
||||
impl<TSubstream> Foo<TSubstream> {
|
||||
fn foo<T>(&mut self) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, String>> { std::task::Poll::Pending }
|
||||
fn foo<T>(&mut self, _: &mut std::task::Context) -> std::task::Poll<libp2p::swarm::NetworkBehaviourAction<T, String>> { std::task::Poll::Pending }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn foo<TSubstream: libp2p::futures::AsyncRead + libp2p::futures::AsyncWrite + Send + Unpin + 'static>(_: &mut std::task::Context) {
|
||||
fn foo<TSubstream: libp2p::futures::AsyncRead + libp2p::futures::AsyncWrite + Send + Unpin + 'static>() {
|
||||
require_net_behaviour::<Foo<TSubstream>>();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user