Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tezos_encoding: useless-format clippy lint on #[encoding(tags = "u8")] #17

Open
emturner opened this issue Feb 27, 2023 · 0 comments
Open

Comments

@emturner
Copy link
Collaborator

Describe the bug
The useless-format clippy lint triggers when defining the tag size for an enum.

To Reproduce

#[derive(HasEncoding, NomReader, BinWriter)]
#[encoding(tags = "u8")]
enum Example {
  First,
  Second
}

Running cargo clippy -- --deny warnings results in:

error: useless use of `format!`
  --> <file>
   |
36 | #[encoding(tags = "u8")]
   |                   ^^^^ help: consider using `.to_string()`: `"u8".to_string()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
   = note: `-D clippy::useless-format` implied by `-D warnings`

Expected behavior
The lint is not triggered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant