mirror of
https://github.com/apple/swift-collections
synced 2026-11-24 04:27:53 +00:00
[Capsule] Add tuple labels to iterator return values
This commit is contained in:
1 parent
3a8ee52e4a
commit
042d2ebe2e
1 file changed
+2
-2
@@ -184,7 +184,7 @@ public struct MapKeyValueTupleIterator<Key: Hashable, Value> {
|
||||
}
|
||||
|
||||
extension MapKeyValueTupleIterator: IteratorProtocol {
|
||||
public mutating func next() -> (Key, Value)? {
|
||||
public mutating func next() -> (key: Key, value: Value)? {
|
||||
guard baseIterator.hasNext() else { return nil }
|
||||
|
||||
let payload: (Key, Value)
|
||||
@@ -211,7 +211,7 @@ public struct MapKeyValueTupleReverseIterator<Key: Hashable, Value> {
|
||||
}
|
||||
|
||||
extension MapKeyValueTupleReverseIterator: IteratorProtocol {
|
||||
public mutating func next() -> (Key, Value)? {
|
||||
public mutating func next() -> (key: Key, value: Value)? {
|
||||
guard baseIterator.hasNext() else { return nil }
|
||||
|
||||
let payload: (Key, Value)
|
||||
|
||||
Reference in new issue
Block a user