Skip to content

unreadable_literal for hex numbers #2300

@nbaksalyar

Description

@nbaksalyar

I think that unreadable_literal rules should be different for hex numbers.
As an example, it suggests to replace 0xabcdef with 0xab_cdef, which arguably makes it less readable.

I would suggest to break hex numbers into groups of 4, then it will replace 0xabcdef01 with 0xabcd_ef01, but leave 0xabcdef as it is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions