rust-lang/rust-clippy

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

Open

#1.216 geöffnet am 5. Sept. 2016

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (1.391 Forks)batch import
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.

Contributor Guide