Skip to content

Commit 41aec37

Browse files
committed
Add 'Keys' API to Multidictionary
1 parent 9b0ac25 commit 41aec37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftDriver/IncrementalCompilation/Multidictionary.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ struct Multidictionary<Key: Hashable, Value: Hashable>: Collection, Equatable {
5353
return (key: key, value: vals[innerIndex])
5454
}
5555
}
56+
57+
/// A collection containing just the keys of this multi-dictionary.
58+
public var keys: OuterDict.Keys {
59+
return self.outerDict.keys
60+
}
5661

5762
public subscript(key: Key) -> (key: Key, values: Set<Value>)? {
5863
outerDict[key].map { (key: key, values: $0) }

0 commit comments

Comments
 (0)