From c6c1a6ef5c2c3662acc83f6a16e0754ae13c177e Mon Sep 17 00:00:00 2001 From: Scott Talbot Date: Sat, 15 Dec 2018 18:29:51 +1100 Subject: [PATCH 1/2] Remove unused Dictionary defaultable subscript --- Sources/Apollo/Collections.swift | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Sources/Apollo/Collections.swift b/Sources/Apollo/Collections.swift index 18fbe7887c..0020d9e7fe 100644 --- a/Sources/Apollo/Collections.swift +++ b/Sources/Apollo/Collections.swift @@ -1,17 +1,3 @@ -extension Dictionary { - subscript(key: Key, withDefault value: @autoclosure () -> Value) -> Value { - mutating get { - if self[key] == nil { - self[key] = value() - } - return self[key]! - } - set { - self[key] = newValue - } - } -} - public extension Dictionary { static func += (lhs: inout Dictionary, rhs: Dictionary) { #if swift(>=3.2) From 40b8186af68a6dccf108ef98c9d82b1a8f204a63 Mon Sep 17 00:00:00 2001 From: Scott Talbot Date: Sat, 15 Dec 2018 18:30:23 +1100 Subject: [PATCH 2/2] Update type of GroupedSequenceIterator.keyIterator --- Sources/Apollo/Collections.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Apollo/Collections.swift b/Sources/Apollo/Collections.swift index 0020d9e7fe..f9282fba75 100644 --- a/Sources/Apollo/Collections.swift +++ b/Sources/Apollo/Collections.swift @@ -44,7 +44,7 @@ extension GroupedSequence: Sequence { struct GroupedSequenceIterator: IteratorProtocol { private var base: GroupedSequence - private var keyIterator: EnumeratedIterator>> + private var keyIterator: EnumeratedSequence>.Iterator init(base: GroupedSequence) { self.base = base