3 ms·
> First, Box lacks some ergonomics, it's a pain dealing with when matching Agreed, but this should become better once box_patterns is stable https://doc.rust-
by spoiler 2y ago
> First, Box lacks some ergonomics, it's a pain dealing with when matching
Agreed, but this should become better once box_patterns is stable
https://doc.rust-lang.org/beta/unstable-book/language-features/box-patterns.html https://doc.rust-lang.org/beta/unstable-book/language-featur...
- estebank 2y agoThat feature is almost assuredly not going to land on stable but the more general "deref_patterns" which would allow matching on boxed values, as well as on `Vec`s and `String`s will. It is not anywhere close to finished, but I am convinced it will land.
- airstrike 2y agoLinks with more info on the current state of deref patterns https://github.com/rust-lang/rust/issues/87121 https://github.com/rust-lang/rust/issues/87121 https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg
- spoiler 2y agoOh I missed that one. Thanks for pointing it out! Here's the proposal for anyone else who's curious https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg