You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we fix (not silence) all "this is a decimal constant" warnings? We discussed that some weeks ago but reached no consensus. To me, writing "3" (decimal) as "03" is SO confusing. Glad that clippy lints against that :-) I would propose to just use hex notation.
this is a decimal constant
warning: this is a decimal constant
--> simple_https_server/src/lib.rs:132:72
|
132 | .write_record(ByteSeq::from_public_slice(&[21, 03, 03, 00, 02, 2, 47]))?;
| ^^
|
= note: `#[warn(clippy::zero_prefixed_literal)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal
help: if you mean to use a decimal constant, remove the `0` to avoid confusion
|
132 | .write_record(ByteSeq::from_public_slice(&[21, 3, 03, 00, 02, 2, 47]))?;
| ~
help: if you mean to use an octal constant, use `0o`
|
132 | .write_record(ByteSeq::from_public_slice(&[21, 0o3, 03, 00, 02, 2, 47]))?;
|
The text was updated successfully, but these errors were encountered:
Can we fix (not silence) all "this is a decimal constant" warnings? We discussed that some weeks ago but reached no consensus. To me, writing "3" (decimal) as "03" is SO confusing. Glad that clippy lints against that :-) I would propose to just use hex notation.
The text was updated successfully, but these errors were encountered: