mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ASTPrinter: Turn on explicit any printing for everything and remove the option to disable it
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user