Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kretin45
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
kretin45
9y ago
Nevermind, I think I've got it, basically, all references to an object should die before an object is changed.
2.
▲
by
kretin45
9y ago
Yes. So I'm asking the logic behind this in context of ownership model. How can you derive the above behavior from the principle that only one mutable reference is allowed? If const iterator is not a mutable reference to a Vec, then A
3.
▲
by
kretin45
9y ago
So, sorry for being not bright. But if I may ask, if I have a Vec<B> A, then, it has I have a mutable reference to it in the form of A. Now, I take a const iterator to an object in A, say it, then, though the iterator is const for obj