diff --git a/Sources/KanaKanjiConverterModule/TemplateData.swift b/Sources/KanaKanjiConverterModule/TemplateData.swift index e42defe..9600c23 100644 --- a/Sources/KanaKanjiConverterModule/TemplateData.swift +++ b/Sources/KanaKanjiConverterModule/TemplateData.swift @@ -39,7 +39,7 @@ public struct TemplateData: Codable { } } - public init(from decoder: Decoder) throws { + public init(from decoder: any Decoder) throws { let values = try decoder.container(keyedBy: CodingKeys.self) let template = try values.decode(String.self, forKey: .template) let name = try values.decode(String.self, forKey: .name) @@ -50,7 +50,7 @@ public struct TemplateData: Codable { literal.previewString() } - public func encode(to encoder: Encoder) throws { + public func encode(to encoder: any Encoder) throws { // containerはvarにしておく var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(self.literal.export(), forKey: .template)