Comment

Comment by jmhain

Is it possible to match the end of a slice with slice patterns? Something like:

    fn foo(s: &[char]) {
        match s {
            ['a', 'b'] => (),
            [.. 'b', 'c'] => (),
            _ => (),
        }
    }
parent jmhain 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton