fixed name collision within components so that recursion is possible

This commit is contained in:
Jose Quesada 2022-12-23 14:47:57 -06:00
parent 7028dd8b3d
commit 86394105dd
1 changed files with 4 additions and 0 deletions

View File

@ -95,6 +95,10 @@ impl ToTokens for Model {
ret,
} = self;
let mut body = body.to_owned();
body.sig.ident = format_ident!("__{}", body.sig.ident);
let (_, generics, where_clause) = body.sig.generics.split_for_impl();
let props_name = format_ident!("{name}Props");