Skip to content

Clippy warning emitted in DecodeWithMemTracking. #705

@gui1117

Description

@gui1117

This code will trigger a clippy warning:

use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};

#[derive(Decode, DecodeWithMemTracking, Encode)]
pub struct InnerBound<Balance: Decode>(Balance);
warning: bound is defined in more than one place
 --> src/lib.rs:4:23
  |
4 | pub struct InnerBound<Balance: Decode>(Balance);
  |                       ^^^^^^^          ^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
  = note: `#[warn(clippy::multiple_bound_locations)]` on by default

The warning will disappear if we remove DecodeWithMemTracking derivation.

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