LNP-BP / client_side_validation

Standard implementation of client-side-validation APIs

Home Page:https://docs.rs/client_side_validation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StrictEncoding issue with enum tuple struct field initialization

cryptoquick opened this issue · comments

When fixing some clippy lints on the descriptor wallet, I ran into an issue here:

Screenshot from 2022-02-09 12-30-55

Docs on the linter rule are here:
https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields

Normally I wouldn't file a feature request just to satisfy a linter, but this might be indicative of some sort of oversight. Feel free to close if we're comfortable with using #![allow(clippy::init_numbered_fields)] in all projects using strict encoding.

Hm, not sure I understand what specifically linter does not like here and how it can be fixed. Any ideas?

sorry for closing, pressed the wrong button

It looks like this is a problem that might be fixed once 1.59 is released:
https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#new-lints

I noticed it goes away if the nightly toolchain is used.

1.59 got released. Can we close this issue?

No, it's just that the lint is in stable now. The issue persists. Sorry for confusing the matter, I misspoke earlier.

Thank you for bringing the attention to the issue!