Skip to content

Commit

Permalink
Add doc comment on generated inline properties struct (#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
hampuslidin committed Jan 2, 2024
1 parent a0b95a8 commit 8230566
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ impl ToTokens for ComponentDeserializerOutput {
fn to_tokens(&self, tokens: &mut TokenStream2) {
let comp_fn = &self.comp_fn;
let props_struct = &self.props_struct;
let fn_ident = &comp_fn.sig.ident;

let doc = format!("Properties for the [`{fn_ident}`] component.");
tokens.append_all(quote! {
#[doc = #doc]
#props_struct
#[allow(non_snake_case)]
#comp_fn
Expand Down

0 comments on commit 8230566

Please sign in to comment.