|
|
|
|
|
by vlovich123
271 days ago
|
|
> Now that we have a Vec with no non-static lifetimes, we can safely move it to another thread. I liked most of the tricks but this one seems pointless. This is no different than transmute as accessing the borrower requires an assume_init which I believe is technically UB when called on an uninit. Unless the point is that you’re going to be working with Owned but want to just transmute the Vec safely. Overall I like the into_iter/collect trick to avoid unsafe. It was also most of the article, just various ways to apply this trick in different scenarios. Very neat! |
|