rust-lang/rust-clippy
在 GitHub 查看FR: redundant_field_names should distinguish between all and some fields matching
Open
#3,422 创建于 2018年11月10日
C-enhancementL-stylegood first issue
仓库指标
- Star
- (10,406 star)
- PR 合并指标
- (平均合并 19天 22小时) (30 天内合并 113 个 PR)
描述
redundant_field_names fires on any field being a match. This impairs readability in cases like this:
let thingy = Thingy {
calc: big + calculation,
redundant: redundant,
other: stuff.into(),
};
As you can see, if you apply the suggestion, you end up with a weird line that is different from the rest. I suggest that the lint be split such that it distinguishes between "all fields are redundant" and "some fields are redundant".