知识卡片
Clippy补充惯用法检查
cargo clippy 可定位能编译但值得改进的写法。书中用近似圆周率提示选择标准库常量。lint 建议适合进入代码审查,能否采用仍取决于项目语义。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 附录 D · 开发工具 More Lints with Clippy · 查看原书依据
The Clippy tool is a collection of lints to analyze your code so you can catch common mistakes and improve your Rust code. Clippy is included with standard Rust installations.
参考来源
- 位置:《The Rust Programming Language(第2版)》附录 D · 开发工具(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/b04.xhtml`,块 0023)
- 结论依据:原文介绍 lint 集及近似 pi 的实例。
- 原始内容:The Clippy tool is a collection of lints to analyze your code so you can catch common mistakes and improve your Rust code. Clippy is included with standard Rust installations.