serenity-rs / poise

Discord bot command framework for serenity, with advanced features like edit tracking and flexible argument parsing
MIT License
624 stars 111 forks source link

Prevent underscore binding lint #216

Closed mattfbacon closed 10 months ago

mattfbacon commented 10 months ago

This lint is triggered when we have an unused parameter in the handler function. The code that's generated copies the identifier name from the function definition, but does use the identifier, so we need to disable this lint. That said, a better solution might be to add a fixed prefix like poise_arg_ to each parameter name.

kangalio commented 10 months ago

I wish Clippy and co would just ignore macro-generated code :pensive:

mattfbacon commented 10 months ago

I would argue that macro-generated code should be held to the same standards as normal code. That said, disabling the lint is way easier than adding a prefix.