rust-lang/rust-clippy

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

Open

#1.563 aberto em 21 de fev. de 2017

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)Rust (1.391 forks)batch import
A-lintE-hardL-unnecessaryT-middlegood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 19d 22h) (113 fundiu PRs em 30d)

Description

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.

Guia do colaborador