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

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

correction: only the sublice patterns will be in 1.42.0

the rest needs to be stabilized for a future release

Show thread
Sign in to participate in the conversation

Linux Geeks doing what Linux Geeks do..