File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -17,23 +17,21 @@ public protocol CxxConvertibleToCollection<Element> {
17
17
where RawIterator. Pointee == Element
18
18
19
19
/// Do not implement this function manually in Swift.
20
- mutating func __beginUnsafe( ) -> RawIterator
20
+ func __beginUnsafe( ) -> RawIterator
21
21
22
22
/// Do not implement this function manually in Swift.
23
- mutating func __endUnsafe( ) -> RawIterator
23
+ func __endUnsafe( ) -> RawIterator
24
24
}
25
25
26
26
extension CxxConvertibleToCollection {
27
27
@inlinable
28
28
internal func forEach( _ body: ( RawIterator . Pointee ) -> Void ) {
29
- var mutableSelf = self
30
- var rawIterator = mutableSelf. __beginUnsafe ( )
31
- let endIterator = mutableSelf. __endUnsafe ( )
29
+ var rawIterator = __beginUnsafe ( )
30
+ let endIterator = __endUnsafe ( )
32
31
while rawIterator != endIterator {
33
32
body ( rawIterator. pointee)
34
33
rawIterator = rawIterator. successor ( )
35
34
}
36
- withExtendedLifetime ( mutableSelf) { }
37
35
}
38
36
}
39
37
You can’t perform that action at this time.
0 commit comments