News for hackers. Stuff that matters.
Re:Things you can’t do in Rust (and what to do instead) by devit on Saturday May 15, 2021 @05:17PM (#27169113)
Use a crate that provides safe functions implemented with unsafe code to do that, like https://docs.rs/splitmut/0.2.1/splitmut/
Re:Things you can’t do in Rust (and what to do instead) by oconnor663 on Saturday May 15, 2021 @06:43PM (#27169654)
Neat! I bet we could add a macro to that crate to make it work with any (static) number of references. A variant of this using a HashSet to check arbitrary collections of keys might be cool too.