Skip to content

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

Description

@emturner

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions