mirror of
https://github.com/Noratrieb/blog.git
synced 2026-01-14 04:25:01 +01:00
add note about mutation uniqueness
This commit is contained in:
parent
6632848833
commit
51573c9e72
1 changed files with 4 additions and 0 deletions
|
|
@ -206,6 +206,10 @@ having to write their own. Interestingly, this crate also provides a `Vec<T>`, e
|
|||
in the current version of stacked borrows. just fine, although it's also not clear whether we want to keep it like this, but I
|
||||
don't think this can reasonable be changed.
|
||||
|
||||
> One thing was just pointed out to me after releasing the post: Mutation usually goes through `&mut T` anyways, even when the value
|
||||
> is stored as a `Box<T>`. Therefore, all the guarantees of uniqueness are already present when mutating boxes, making the uniqueness
|
||||
> of box even less important.
|
||||
|
||||
# noalias, noslow
|
||||
|
||||
There is one clear potential benefit from this box behaviour: ✨Optimizations✨. `noalias` doesn't exist for fun, it's something
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue