| is gettings some nice new pattern matching features in the next stable release (1.42.0)

blog.rust-lang.org/inside-rust

in short:
• subslice patterns, e.g. [x0, .., x1] => match only first and last element
• nested-OR patterns, e.g. Some(x | y) == Some(x) | Some(y)
• binding inner fields with @
• move & ref bindings in same pattern

Follow

correction: only the sublice patterns will be in 1.42.0

the rest needs to be stabilized for a future release

Sign in to participate in the conversation
LinuxRocks.Online

Linux Geeks doing what Linux Geeks do..