rust-lang/rust-clippy

Lint functions taking references as arguments but only use them to create an owned value

Open

#1563 aperta il 21 feb 2017

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Rust (1391 fork)batch import
A-lintE-hardL-unnecessaryT-middlegood first issue

Metriche repository

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

Descrizione

A function that takes a &str and always converts it to a String, should be taking a String argument instead. This is hard to generalize, but we could start with anything implementing to_owned and only calling to_owned.

Guida contributor