mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-14 10:31:21 +00:00
Fix custom derive when using a where clause (#853)
When injecting the users where clause we need to ensure a comma is inserted between the users where clause and ours.
This commit is contained in:
committed by
Pierre Krieger
parent
2b4d9786ac
commit
69abfbb18e
@ -112,7 +112,7 @@ fn build_struct(ast: &DeriveInput, data_struct: &DataStruct) -> TokenStream {
|
||||
additional.push(quote!{#substream_generic: ::libp2p::tokio_io::AsyncWrite});
|
||||
|
||||
if let Some(where_clause) = where_clause {
|
||||
Some(quote!{#where_clause #(#additional),*})
|
||||
Some(quote!{#where_clause, #(#additional),*})
|
||||
} else {
|
||||
Some(quote!{where #(#additional),*})
|
||||
}
|
||||
|
Reference in New Issue
Block a user