mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-20 14:41:21 +00:00
swarm-derive: Specify NetworkBehaviour
by full path (#2932)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io> Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
parent
b28ab2c6bc
commit
04b07c4d14
@ -2,8 +2,10 @@
|
||||
|
||||
- Fix an issue where the derive would generate bad code if the type parameters between the behaviour and a custom
|
||||
out event differed. See [PR 2907].
|
||||
- Fix an issue where the derive would generate incorrect code depending on available imports. See [PR 2921].
|
||||
|
||||
[PR 2907]: https://github.com/libp2p/rust-libp2p/pull/2907
|
||||
[PR 2921]: https://github.com/libp2p/rust-libp2p/pull/2921
|
||||
|
||||
# 0.30.0
|
||||
|
||||
|
@ -125,7 +125,7 @@ fn build_struct(ast: &DeriveInput, data_struct: &DataStruct) -> TokenStream {
|
||||
)
|
||||
.unwrap();
|
||||
let ty = &field.ty;
|
||||
quote! {#variant(<#ty as NetworkBehaviour>::OutEvent)}
|
||||
quote! {#variant(<#ty as #trait_to_impl>::OutEvent)}
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
let visibility = &ast.vis;
|
||||
|
Loading…
x
Reference in New Issue
Block a user