Skip to content

style(proto): fix decimal_literal_representation lint#4117

Merged
seanmonstar merged 2 commits into
hyperium:masterfrom
josetorrs:remove-decimal-literal-representation
Jun 29, 2026
Merged

style(proto): fix decimal_literal_representation lint#4117
seanmonstar merged 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

@seanmonstar seanmonstar merged commit e0d14d1 into hyperium:master Jun 29, 2026
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants