Skip to content

Commit 7a63f9d

Browse files
committed
Fix typo in SingleValueContainer in JSONDecoder.swift
1 parent 59346dd commit 7a63f9d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Sources/Foundation/JSONDecoder.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ extension JSONDecoderImpl: Decoder {
258258
}
259259

260260
@usableFromInline func singleValueContainer() throws -> SingleValueDecodingContainer {
261-
SingleValueContainter(
261+
SingleValueContainer(
262262
impl: self,
263263
codingPath: self.codingPath,
264264
json: self.json
@@ -293,18 +293,18 @@ extension JSONDecoderImpl: Decoder {
293293
return try Date(from: self)
294294

295295
case .secondsSince1970:
296-
let container = SingleValueContainter(impl: self, codingPath: self.codingPath, json: self.json)
296+
let container = SingleValueContainer(impl: self, codingPath: self.codingPath, json: self.json)
297297
let double = try container.decode(Double.self)
298298
return Date(timeIntervalSince1970: double)
299299

300300
case .millisecondsSince1970:
301-
let container = SingleValueContainter(impl: self, codingPath: self.codingPath, json: self.json)
301+
let container = SingleValueContainer(impl: self, codingPath: self.codingPath, json: self.json)
302302
let double = try container.decode(Double.self)
303303
return Date(timeIntervalSince1970: double / 1000.0)
304304

305305
case .iso8601:
306306
if #available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
307-
let container = SingleValueContainter(impl: self, codingPath: self.codingPath, json: self.json)
307+
let container = SingleValueContainer(impl: self, codingPath: self.codingPath, json: self.json)
308308
let string = try container.decode(String.self)
309309
guard let date = _iso8601Formatter.date(from: string) else {
310310
throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: self.codingPath, debugDescription: "Expected date string to be ISO8601-formatted."))
@@ -316,7 +316,7 @@ extension JSONDecoderImpl: Decoder {
316316
}
317317

318318
case .formatted(let formatter):
319-
let container = SingleValueContainter(impl: self, codingPath: self.codingPath, json: self.json)
319+
let container = SingleValueContainer(impl: self, codingPath: self.codingPath, json: self.json)
320320
let string = try container.decode(String.self)
321321
guard let date = formatter.date(from: string) else {
322322
throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: self.codingPath, debugDescription: "Date string does not match format expected by formatter."))
@@ -334,7 +334,7 @@ extension JSONDecoderImpl: Decoder {
334334
return try Data(from: self)
335335

336336
case .base64:
337-
let container = SingleValueContainter(impl: self, codingPath: self.codingPath, json: self.json)
337+
let container = SingleValueContainer(impl: self, codingPath: self.codingPath, json: self.json)
338338
let string = try container.decode(String.self)
339339

340340
guard let data = Data(base64Encoded: string) else {
@@ -349,7 +349,7 @@ extension JSONDecoderImpl: Decoder {
349349
}
350350

351351
private func unwrapURL() throws -> URL {
352-
let container = SingleValueContainter(impl: self, codingPath: self.codingPath, json: self.json)
352+
let container = SingleValueContainer(impl: self, codingPath: self.codingPath, json: self.json)
353353
let string = try container.decode(String.self)
354354

355355
guard let url = URL(string: string) else {
@@ -520,7 +520,7 @@ extension Decodable {
520520
}
521521

522522
extension JSONDecoderImpl {
523-
struct SingleValueContainter: SingleValueDecodingContainer {
523+
struct SingleValueContainer: SingleValueDecodingContainer {
524524
let impl: JSONDecoderImpl
525525
let value: JSONValue
526526
let codingPath: [CodingKey]

0 commit comments

Comments
 (0)