rust-lang/rust-clippy

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

Open

#1216 aperta il 5 set 2016

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)Rust (1391 fork)batch import
A-lintL-styleT-middlegood first issue

Metriche repository

Star
 (10.406 star)
Metriche merge PR
 (Merge medio 19g 22h) (113 PR mergiate in 30 g)

Descrizione

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.

Guida contributor