rust-lang/rust-clippy

lint String::as_str()

Aberta

#874 aberto em 23 de abr. de 2016

 (9 comentários) (0 reação) (0 responsável)Rust (1.391 forks)batch import
A-lintT-middlegood first issue

Métricas do repositório

Stars
 (10.406 estrelas)
Métricas de merge de PR
 (Mesclagem média 19d 22h) (113 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