Skip to content

Commit

Permalink
fix template declaration on methods
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Jul 9, 2024
1 parent 853c0d8 commit c11a938
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/builder/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,13 @@ fn fmt_param(param: &Entity, builder: &Builder) -> Html {
}

fn fmt_template_args(entity: &Entity, _builder: &Builder) -> Option<Html> {
let template_children = if entity.get_kind() == EntityKind::FunctionTemplate {
entity.get_children().into_iter().filter(|e| e.get_kind() == EntityKind::TemplateTypeParameter).collect()
} else {
entity.get_template()?.get_children()
};
Some(HtmlList::new(
entity.get_template()?
.get_children()
template_children
.into_iter()
.map(|e|
HtmlText::new(e.get_name().unwrap_or("_".to_string())).into()
Expand Down

0 comments on commit c11a938

Please sign in to comment.