Rust: remove <> from function wrapper

This commit is contained in:
Paolo Tranquilli
2024-09-06 14:34:12 +02:00
parent ac9e977baa
commit 928f3f11f1
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,10 @@ class Function:
if self.params:
self.params[0].first = True
@property
def has_generic_params(self) -> bool:
return bool(self.generic_params)
@dataclasses.dataclass
class TestCode:

View File

@@ -1,7 +1,7 @@
// generated by {{generator}}
{{#function}}
fn {{name}}<{{#generic_params}}{{^first}}, {{/first}}{{name}}{{#type}}: {{.}}{{/type}}{{/generic_params}}>({{#params}}{{^first}}, {{/first}}{{name}}: {{type}}{{/params}}) -> {{return_type}} {
fn {{name}}{{#has_generic_params}}<{{#generic_params}}{{^first}}, {{/first}}{{name}}{{#type}}: {{.}}{{/type}}{{/generic_params}}>{{/has_generic_params}}({{#params}}{{^first}}, {{/first}}{{name}}: {{type}}{{/params}}) -> {{return_type}} {
{{/function}}
{{code}}
{{#function}}