rust-lang/rust-clippy

lint String::as_str()

Aperta

#874 aperta il 23 apr 2016

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

Metriche repository

Star
 (10.406 stelle)
Metriche merge PR
 (Merge medio 19g 22h) (113 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