Skip to content

style(proto): fix decimal_literal_representation lint#4117

Open
josetorrs wants to merge 2 commits into
hyperium:masterfrom
josetorrs:remove-decimal-literal-representation
Open

style(proto): fix decimal_literal_representation lint#4117
josetorrs wants to merge 2 commits into
hyperium:masterfrom
josetorrs:remove-decimal-literal-representation

Conversation

@josetorrs

Copy link
Copy Markdown
Contributor

Part of #4071

What it does
Warns if there is a better representation for a numeric literal.

Why restrict this?
Especially for big powers of 2, a hexadecimal representation is usually more readable than a decimal representation.

from the docs though TBH I think 65_535 is more readable here

@seanmonstar

Copy link
Copy Markdown
Member

Hm, I agree, the 65k feels clearer the FFFF. Perhaps not as useful of a lint...

@josetorrs josetorrs force-pushed the remove-decimal-literal-representation branch from 06f2965 to e26a770 Compare June 26, 2026 15:36
@josetorrs

Copy link
Copy Markdown
Contributor Author

Hm, I agree, the 65k feels clearer the FFFF. Perhaps not as useful of a lint...

added it to the explicitly allowed list

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

Successfully merging this pull request may close these issues.

2 participants