Correctly label non-throwing functions

Remove throws from Element constructor
This commit is contained in:
Christoph Hagen
2022-09-08 09:30:54 +02:00
parent 28623d1209
commit 81b373fb5a
5 changed files with 20 additions and 20 deletions

View File

@ -35,7 +35,7 @@ struct LocalizedSiteTemplate {
factory.page
}
init(factory: TemplateFactory, language: String, site: Element) throws {
init(factory: TemplateFactory, language: String, site: Element) {
self.author = site.author
self.factory = factory
@ -61,7 +61,7 @@ struct LocalizedSiteTemplate {
url: $0.path + Element.htmlPagePathAddition(for: language))
}
self.topBar = try .init(
self.topBar = .init(
factory: factory,
language: language,
sections: sections,

View File

@ -10,7 +10,7 @@ struct PrefilledTopBarTemplate {
private let factory: TemplateFactory
init(factory: TemplateFactory, language: String, sections: [SectionInfo], topBarWebsiteTitle: String) throws {
init(factory: TemplateFactory, language: String, sections: [SectionInfo], topBarWebsiteTitle: String) {
self.factory = factory
self.language = language
self.sections = sections