I did something like this, which works:
let s = " \"".as_bytes();
let (space, quote) = (s[0], s[1]);
I wanted to do something like this
&[space, quote] = " \"".as_bytes();
But it gives me the error
slice pattern syntax is experimental (see issue #23121)
Is it possible to do something similar?
Aucun commentaire:
Enregistrer un commentaire