ASTPrinter: Turn on explicit any printing for everything and remove the option to disable it

This commit is contained in:
Anthony Latsis
2023-05-05 03:18:02 +03:00
parent 01086bc8b5
commit 7f6d3bcd41
85 changed files with 1258 additions and 1255 deletions

View File

@@ -8,7 +8,7 @@ struct User: Codable {
case lastName
}
init(from decoder: Decoder) throws {
init(from decoder: any Decoder) throws {
let container: KeyedDecodingContainer<User.CodingKeys> = try decoder.container(keyedBy: User.CodingKeys.self)
self.firstName = try container.decode(String.self, forKey: User.CodingKeys.firstName)
@@ -16,7 +16,7 @@ struct User: Codable {
}
func encode(to encoder: Encoder) throws {
func encode(to encoder: any Encoder) throws {
var container = encoder.container(keyedBy: User.CodingKeys.self)
try container.encode(self.firstName, forKey: User.CodingKeys.firstName)