Closed dudycz closed 3 months ago
Thank you for your issue. The generated new
constructors are provided to create instances of non_exhaustive
structs, as these cannot be constructed with a StructExpression
. If we don't want to plainly ignore the clippy warning in the generated bindings, we would need to generate another way of constructing non_exhaustive
types, for example a builder. To be honest, I would simply #![allow(clippy::too_many_arguments)]
, but if you feel motivated to implement a more elegant solution I'd be more than happy to review it.
Do you mean to add #![allow(clippy::too_many_arguments)]
in the generated module, right? It would be great and solve this problem.
Yes, it's merely a matter of adding too_many_arguments
to the allowed lints here.
I believe this could be closed with #29, not sure why it did not auto-close.
Hello,
In case of complex and big ASN1 definitions (like the ones from 3gpp) generated new() methods are causing clippy warnings:
"this function has too many arguments"
Having an option to choose whether to generate new or not would solve this kind of issue.