Skip to content

Commit

Permalink
Merge pull request #5 from ensan-hcl/fix/existential_any
Browse files Browse the repository at this point in the history
[fix] Swift5.9以降のExistentialAny対応
  • Loading branch information
ensan-hcl authored Jul 23, 2023
2 parents 2839b4a + 8f00380 commit 568a118
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/KanaKanjiConverterModule/TemplateData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 568a118

Please sign in to comment.