rust-lang/rust-clippy

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

Open

#1,216 opened on 2016年9月5日

GitHub で見る
 (7 comments) (0 reactions) (0 assignees)Rust (1,391 forks)batch import
A-lintL-styleT-middlegood first issue

Repository metrics

Stars
 (10,406 stars)
PR merge metrics
 (平均マージ 19d 22h) (30d で 113 merged PRs)

説明

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.

コントリビューターガイド