Skip to content

Commit a4f7ea4

Browse files
fix: Removes cast warning
These can be removed because the other cases are there to support standard non-Map scalars. Since OrderedDictionary is already covered by Map.dictionary, we don't ever enter these cases.
1 parent d68bfb7 commit a4f7ea4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Sources/GraphQL/Map/GraphQLJSONEncoder.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,6 @@ extension JSONEncoderImpl: _SpecialTreatmentEncoder {
473473
return .string(url.absoluteString)
474474
case let decimal as Decimal:
475475
return .number(decimal.description)
476-
case let object as OrderedDictionary<
477-
String,
478-
Encodable
479-
>: // this emits a warning, but it works perfectly
480-
return try wrapObject(object, for: nil)
481476
case let date as Date:
482477
return try wrapDate(date, for: nil)
483478
default:
@@ -545,8 +540,6 @@ extension _SpecialTreatmentEncoder {
545540
return .string(url.absoluteString)
546541
case let decimal as Decimal:
547542
return .number(decimal.description)
548-
case let object as OrderedDictionary<String, Encodable>:
549-
return try wrapObject(object, for: additionalKey)
550543
default:
551544
let encoder = getEncoder(for: additionalKey)
552545
try encodable.encode(to: encoder)

0 commit comments

Comments
 (0)