Skip to content

Commit a8598de

Browse files
committed
Make the localization structure sendable
1 parent 71f3e07 commit a8598de

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/HTMLKit/Framework/Localization/Localization.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22

33
/// A type that represents the localization
44
@_documentation(visibility: internal)
5-
public class Localization {
5+
public struct Localization: Sendable {
66

77
/// A enumeration of errors regarding the localization rendering
88
public enum Errors: Error, Equatable {
@@ -81,14 +81,14 @@ public class Localization {
8181
/// Sets the source directory
8282
///
8383
/// - Parameter source: The directory where the translations should be loaded from.
84-
public func set(source: URL) {
84+
public mutating func set(source: URL) {
8585
self.tables = load(source: source)
8686
}
8787

8888
/// Sets the default locale
8989
///
9090
/// - Parameter locale: A locale tag e.g. en-US
91-
public func set(locale: String) {
91+
public mutating func set(locale: String) {
9292
self.locale = Locale(tag: locale)
9393
}
9494

0 commit comments

Comments
 (0)