3 ms·
Isn't the mutable borrow ended after the end of the x += 1 line? leaving you free to read the contents of the ptr? I don't know swift at all. but from their do
by leshow 9y ago
Isn't the mutable borrow ended after the end of the x += 1 line? leaving you free to read the contents of the ptr?
I don't know swift at all. but from their document on swapAt() it looks like they are trying to prevent two fn(&p, &p) where func fn(a: inout Type, b: inout Type)
- hellofunk 9y ago> Isn't the mutable borrow ended after the end of the x += 1 line? No, see Mike's comment here.