rust-lang/rust-clippy

lint String::as_str()

Open

#874 ouverte le 23 avr. 2016

Voir sur GitHub
 (9 commentaires) (0 réactions) (0 assignés)Rust (1 391 forks)batch import
A-lintT-middlegood first issue

Métriques du dépôt

Stars
 (10 406 stars)
Métriques de merge PR
 (Merge moyen 16j 6h) (79 PRs mergées en 30 j)

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.

Guide contributeur