rust-libp2p/swarm/tests/ui/fail/out_event_deprecation.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
406 B
Rust
Raw Normal View History

#![deny(warnings)] // Ensure the warnings we produce surface as errors.
use libp2p_ping as ping;
#[derive(libp2p_swarm::NetworkBehaviour)]
#[behaviour(out_event = "FooEvent", prelude = "libp2p_swarm::derive_prelude")]
struct Foo {
ping: ping::Behaviour,
}
struct FooEvent;
impl From<ping::Event> for FooEvent {
fn from(_: ping::Event) -> Self {
unimplemented!()
}
}
fn main() {
}