rust-lang/rust-clippy
Auf GitHub ansehenLint functions taking references as arguments but only use them to create an owned value
Open
#1.563 geöffnet am 21. Feb. 2017
A-lintE-hardL-unnecessaryT-middlegood first issue
Repository-Metriken
- Stars
- (10.406 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)
Beschreibung
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.