rust-lang/rust-clippy

lint usage of struct constructors when new/from method is available

Open

#1,216 创建于 2016年9月5日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)Rust (1,391 fork)batch import
A-lintL-styleT-middlegood first issue

仓库指标

Star
 (10,406 star)
PR 合并指标
 (平均合并 19天 22小时) (30 天内合并 113 个 PR)

描述

if a struct has a new or a from method that does the same as a struct constructor, then that method should be used instead of the struct constructor.

Obviously the usage of a struct constructor inside the new or from method should not be linted.

贡献者指南