rust-lang/rust-clippy

lint String::as_str()

Open

#874 aperta il 23 apr 2016

Vedi su GitHub
 (9 commenti) (0 reazioni) (0 assegnatari)Rust (1391 fork)batch import
A-lintT-middlegood first issue

Metriche repository

Star
 (10.406 star)
Metriche merge PR
 (Merge medio 16g 6h) (79 PR mergiate in 30 g)

Descrizione

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.

Guida contributor