Skip to content

mutable_key_type false positives #5325

Closed
@mimoo

Description

@mimoo

Hello!

We're getting false positives with the mutable_key_type rule: https://circleci.com/gh/libra/libra/41319?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link

It seems to be triggered by this:

HashSet<ProtocolId>

where ProtocolId is defined as

pub type ProtocolId = protocols::wire::messaging::v1::ProtocolId;

which is

#[repr(u8)]
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum ProtocolId {
    ConsensusRpc = 0,
    ConsensusDirectSend = 1,
    MempoolDirectSend = 2,
    StateSynchronizerDirectSend = 3,
    DiscoveryDirectSend = 4,
    HealthCheckerRpc = 5,
    IdentityDirectSend = 6,
}

I wasn't able to reproduce it with a simple example, so not sure why clippy is getting triggered here.

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions