rust-lang/rust-clippy

lint String::as_str()

Open

#874 aberto em 23 de abr. de 2016

Ver no GitHub
 (9 comments) (0 reactions) (0 assignees)Rust (1.391 forks)batch import
A-lintT-middlegood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 16d 6h) (79 fundiu PRs em 30d)

Description

Using my_string.as_str() is noisy and adds no value in comparison to &my_string. This lint should not apply to using it in a .map(_) or some other higher-order stuff, just calling the function directly.

Guia do colaborador