Closed y21 closed 1 year ago
The reason I omitted support for destructuring patterns is that there is no clear parameter name anymore.
Thinking about it, you technically don't need it for text commands. So I guess CommandParameter.name
could be made optional. Not sure if it's worth the extra complexity
It would be nice if destructuring patterns were supported for parameters in functions annotated with the
#[poise::command]
macro. That is, this currently does not compile (as it only accepts identifier patterns atm):It's not particularily important I suppose, one can always just write
let CodeBlock { code, .. } = block;
in the body (or access struct fields manually) but it would be a nice-to-have :)