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> {
1717 where RawIterator. Pointee == Element
1818
1919 /// Do not implement this function manually in Swift.
20- mutating func __beginUnsafe( ) -> RawIterator
20+ func __beginUnsafe( ) -> RawIterator
2121
2222 /// Do not implement this function manually in Swift.
23- mutating func __endUnsafe( ) -> RawIterator
23+ func __endUnsafe( ) -> RawIterator
2424}
2525
2626extension CxxConvertibleToCollection {
2727 @inlinable
2828 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 ( )
3231 while rawIterator != endIterator {
3332 body ( rawIterator. pointee)
3433 rawIterator = rawIterator. successor ( )
3534 }
36- withExtendedLifetime ( mutableSelf) { }
3735 }
3836}
3937
You can’t perform that action at this time.
0 commit comments