rust-lang/rust-clippy
Auf GitHub ansehenlint usage of struct constructors when new/from method is available
Open
#1.216 geöffnet am 5. Sept. 2016
A-lintL-styleT-middlegood first issue
Repository-Metriken
- Stars
- (10.406 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)
Beschreibung
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.