mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-03 19:51:33 +00:00
swarm-derive/: Add where clause of behaviour to generated out event (#2819)
When generating the `OutEvent` for a `NetworkBehaviour`, add the `where` clause of the `NetworkBehaviour` `struct` to the generated `enum`.
This commit is contained in:
@ -159,7 +159,9 @@ fn build_struct(ast: &DeriveInput, data_struct: &DataStruct) -> TokenStream {
|
||||
let visibility = &ast.vis;
|
||||
|
||||
Some(quote! {
|
||||
#visibility enum #name #impl_generics {
|
||||
#visibility enum #name #impl_generics
|
||||
#where_clause
|
||||
{
|
||||
#(#fields),*
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user