入门 The Cargo Team 2026-09-13 15:48:22 · 0 阅读
第42章 Cargo fmt:使用 rustfmt 格式化 Rust 代码指南
名称
cargo-fmt — 使用 rustfmt 格式化当前 crate 的所有二进制和库文件
描述
这是一个随 Rust 工具链以可选组件形式分发的外部命令。 它并非内置于 Cargo 中,可能需要额外安装。
有关用法和安装的详细信息, 请参阅 https://github.com/rust-lang/rustfmt。