rust-lang/rust-clippy

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

Open

#1 216 ouverte le 5 sept. 2016

Voir sur GitHub
 (7 commentaires) (0 réactions) (0 assignés)Rust (1 391 forks)batch import
A-lintL-styleT-middlegood first issue

Métriques du dépôt

Stars
 (10 406 stars)
Métriques de merge PR
 (Merge moyen 19j 22h) (113 PRs mergées en 30 j)

Description

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.

Guide contributeur