rust-lang/rust-clippy

lint String::as_str()

开放

#874 创建于 2016年4月23日

 (9 条评论) (0 个反应) (0 位负责人)Rust (1,391 个派生)batch import
A-lintT-middlegood first issue

仓库指标

星标
 (10,406 个星标)
PR 合并指标
 (平均合并 19天 22小时) (30 天内合并 113 个 PR)

描述

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.

贡献者指南