rust-lang/rust-clippy

Inconsistent underscores false positive?

Open

#6,836 建立於 2021年3月3日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Rust (1,391 fork)batch import
C-enhancementgood first issue

倉庫指標

Star
 (10,406 star)
PR 合併指標
 (平均合併 19天 22小時) (30 天內合併 113 個 PR)

描述

Ok so this is a fun one. cargo fmt doesn't understand astetics of verticals alas ( https://github.com/rust-lang/rustfmt/issues/4710 ), but with the odd trailing _ you can fool cargo fmt into doing the right thing and making things beautiful:

https://github.com/mimblewimble/grin/pull/3572/files

But clippy's not happy with inconsistent underscores. ( https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping )

Is there a better solution than a few trailing underscores? (leading underscores are banned) if not, could clippy not complain about trailing underscores please?

Tables come up a lot in programming so it would be nice to have good ways to format them.

貢獻者指南