Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang Liu committed Nov 1, 2023
2 parents 7e5ee48 + 6774de3 commit 8a73d76
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Sources/SwiftAvroCore/Codable/AvroEncodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,13 @@ fileprivate final class AvroBinaryEncoder: Encoder {
public var codingPath: [CodingKey] = []

public var userInfo: [CodingUserInfoKey : Any] = [CodingUserInfoKey : Any]()
var unkeyedContainerCache: AvroUnkeyedEncodingContainer? = nil
public var encodeKey: Bool = false
public func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> {
return KeyedEncodingContainer(AvroKeyedEncodingContainer<Key>(encoder: self, schema: schema))
}
public var currrentType: Mirror? = nil
public func unkeyedContainer() -> UnkeyedEncodingContainer {
if let container = unkeyedContainerCache {
return container
}
unkeyedContainerCache = AvroUnkeyedEncodingContainer(encoder: self, schema: schema)
return unkeyedContainerCache!
return AvroUnkeyedEncodingContainer(encoder: self, schema: schema)
}

public func singleValueContainer() -> SingleValueEncodingContainer {
Expand Down

0 comments on commit 8a73d76

Please sign in to comment.