rust-lang/rust-clippy

lint String::as_str()

Offen

#874 geöffnet am 23.04.2016

 (9 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (1.391 Forks)batch import
A-lintT-middlegood first issue

Repository-Metriken

Stars
 (10.406 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide