News for hackers. Stuff that matters.
Re:Rusty Ownership and the Lifecycle’s Stone by bobbylarrybobby on Sunday November 27, 2022 @02:32PM (#33765899)
For someone looking for an example of this, here's a SO post: https://stackoverflow.com/questions/74592882/extend-a-string...

Tl;dr Rust can't distinguish between a `Vec` whose length is mutable (which might need to reallocate) and one whose elements are mutable (which can provide mutable references to its elements but will never have to move them), so it prevents mutation in a case where it would be safe.

Re:Rusty Ownership and the Lifecycle’s Stone by zozbot234 on Sunday November 27, 2022 @02:57PM (#33766154)
Isn't the latter just a mutable slice?