rust-lang/rust-clippy

lint String::as_str()

Ouverte

#874 ouverte le 23 avr. 2016

 (9 commentaires) (0 réaction) (0 personne assignée)Rust (1 391 forks)batch import
A-lintT-middlegood first issue

Métriques du dépôt

Stars
 (10 406 étoiles)
Métriques de merge PR
 (Merge moyen 19j 22h) (113 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