File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,20 @@ public protocol CxxDictionary<Key, Value> {
25
25
26
26
/// Do not implement this function manually in Swift.
27
27
func __endUnsafe( ) -> RawIterator
28
+ }
28
29
30
+ extension CxxDictionary {
31
+ @inlinable
32
+ public subscript( key: Key ) -> Value ? {
33
+ get {
34
+ let iter = __findUnsafe ( key)
35
+ guard iter != __endUnsafe ( ) else {
36
+ return nil
37
+ }
38
+ return iter. pointee. second
39
+ }
40
+ }
41
+
29
42
func filter(
30
43
_ isIncluded: ( Key , Value ) throws -> Bool
31
44
) rethrows -> [ Key : Value ] {
@@ -42,16 +55,3 @@ public protocol CxxDictionary<Key, Value> {
42
55
}
43
56
}
44
57
}
45
-
46
- extension CxxDictionary {
47
- @inlinable
48
- public subscript( key: Key ) -> Value ? {
49
- get {
50
- let iter = __findUnsafe ( key)
51
- guard iter != __endUnsafe ( ) else {
52
- return nil
53
- }
54
- return iter. pointee. second
55
- }
56
- }
57
- }
You can’t perform that action at this time.
0 commit comments