rust-lang/rust-clippy

lint String::as_str()

Open

#874 geöffnet am 23. Apr. 2016

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

Repository-Metriken

Stars
 (10.406 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 16T 6h) (79 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