rust-lang/rust-clippy
在 GitHub 查看lint usage of struct constructors when new/from method is available
Open
#1,216 建立於 2016年9月5日
A-lintL-styleT-middlegood first issue
描述
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.