Closed gilescope closed 3 years ago
Q) Have you tried running clippy
against this? What does it make of the _
suffixes?
Clippy complains:
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:80:6
|
80 | 16994232_, 22975978_, 32664019_, 44016212_, 50238216_, 57272481_, 85779161_,
| ^^^^^^^^^ help: consider: `16_994_232`
|
= note: `#[warn(clippy::inconsistent_digit_grouping)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:80:17
|
80 | 16994232_, 22975978_, 32664019_, 44016212_, 50238216_, 57272481_, 85779161_,
| ^^^^^^^^^ help: consider: `22_975_978`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:80:28
|
80 | 16994232_, 22975978_, 32664019_, 44016212_, 50238216_, 57272481_, 85779161_,
| ^^^^^^^^^ help: consider: `32_664_019`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:80:39
|
80 | 16994232_, 22975978_, 32664019_, 44016212_, 50238216_, 57272481_, 85779161_,
| ^^^^^^^^^ help: consider: `44_016_212`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:80:50
|
80 | 16994232_, 22975978_, 32664019_, 44016212_, 50238216_, 57272481_, 85779161_,
| ^^^^^^^^^ help: consider: `50_238_216`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:80:61
|
80 | 16994232_, 22975978_, 32664019_, 44016212_, 50238216_, 57272481_, 85779161_,
| ^^^^^^^^^ help: consider: `57_272_481`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:80:72
|
80 | 16994232_, 22975978_, 32664019_, 44016212_, 50238216_, 57272481_, 85779161_,
| ^^^^^^^^^ help: consider: `85_779_161`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:192:6
|
192 | 4391451__, 36730677_, 38198400_, 38797304_, 60700446_, 72910191_, 73050441_,
| ^^^^^^^^^ help: consider: `4_391_451`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:192:17
|
192 | 4391451__, 36730677_, 38198400_, 38797304_, 60700446_, 72910191_, 73050441_,
| ^^^^^^^^^ help: consider: `36_730_677`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:192:28
|
192 | 4391451__, 36730677_, 38198400_, 38797304_, 60700446_, 72910191_, 73050441_,
| ^^^^^^^^^ help: consider: `38_198_400`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:192:39
|
192 | 4391451__, 36730677_, 38198400_, 38797304_, 60700446_, 72910191_, 73050441_,
| ^^^^^^^^^ help: consider: `38_797_304`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:192:50
|
192 | 4391451__, 36730677_, 38198400_, 38797304_, 60700446_, 72910191_, 73050441_,
| ^^^^^^^^^ help: consider: `60_700_446`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
warning: digits grouped inconsistently by underscores
--> core/src/genesis.rs:192:61
|
192 | 4391451__, 36730677_, 38198400_, 38797304_, 60700446_, 72910191_, 73050441_,
| ^^^^^^^^^ help: consider: `72_910_191`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
I'd agree this is a bit weird.
Hmm. I wonder if they've been to hasty warning about trailing underscores. I do feel we should be able to have our cake and eat it somehow. ( have asked them https://github.com/rust-lang/rust-clippy/issues/6836 as they've probably never considered this usage before). I guess we could turn off this specific clippy warning. That might be as good as it gets.
Is it be possible to disable the clippy warning for these lines only e.g. something like https://stackoverflow.com/questions/55402812/how-to-disable-a-clippy-lint-for-a-single-line-block ?
@gilescope I suggest we try if the above approach works since it seems to get us much better visibility without ignoring the warning throughout the project :+1:
Purely asthetics - no functional change. (Leading
_
are not allowed.)( I won't at all be offended if you don't want to merge this. Totally up to you. )