swarm-derive/: Remove support for ignoring fields on struct (#2842)

With the removal of `NetworkBehaviourEventProcess` there is no more need for
ignoring fields.
This commit is contained in:
Max Inden
2022-08-29 07:39:47 +02:00
committed by GitHub
parent 247b5536d4
commit 6855ab943b
5 changed files with 40 additions and 135 deletions

View File

@@ -85,11 +85,6 @@ async fn main() -> Result<(), Box<dyn Error>> {
struct MyBehaviour {
floodsub: Floodsub,
mdns: Mdns,
// Struct fields which do not implement NetworkBehaviour need to be ignored
#[behaviour(ignore)]
#[allow(dead_code)]
ignored_member: bool,
}
#[allow(clippy::large_enum_variant)]
@@ -117,7 +112,6 @@ async fn main() -> Result<(), Box<dyn Error>> {
let mut behaviour = MyBehaviour {
floodsub: Floodsub::new(local_peer_id),
mdns,
ignored_member: false,
};
behaviour.floodsub.subscribe(floodsub_topic.clone());