Skip to content

Commit

Permalink
Make shape init inlinable
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Sep 21, 2024
1 parent 3195332 commit e6be4d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/SotoCodeGeneratorLib/Templates/struct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ extension Templates {
{{scope}} init() {}
{{/empty(members)}}
{{^empty(members)}}
@inlinable
{{scope}} init({{#initParameters}}{{parameter}}: {{type}}{{#default}} = {{.}}{{/default}}{{^last()}}, {{/last()}}{{/initParameters}}) {
{{#members}}
{{^deprecated}}
Expand All @@ -84,6 +85,7 @@ extension Templates {
{{^empty(deprecatedMembers)}}
@available(*, deprecated, message: "Members {{#deprecatedMembers}}{{.}}{{^last()}}, {{/last()}}{{/deprecatedMembers}} have been deprecated")
@inlinable
{{scope}} init({{#members}}{{parameter}}: {{type}}{{#default}} = {{.}}{{/default}}{{^last()}}, {{/last()}}{{/members}}) {
{{#members}}
self.{{variable}} = {{variable}}
Expand Down

0 comments on commit e6be4d7

Please sign in to comment.