ITADN

Add MSRV badge to README and create rustfmt configuration file

#9Pull Requestonuralpszr 创建于 2025-11-27
documentationenhancement
O
onuralpszrcommented
<!-- Thank you 🙏 for your contribution to [Ultralytics](https://www.ultralytics.com/) 🚀! Your effort in enhancing our repositories is greatly appreciated. To streamline the process and assist us in integrating your Pull Request (PR) effectively, please follow these steps: 1. Check for Existing Contributions: Before submitting, kindly explore existing PRs to ensure your contribution is unique and complementary. 2. Link Related Issues: If your PR addresses an open issue, please link it in your submission. This helps us better understand the context and impact of your contribution. 3. Elaborate Your Changes: Clearly articulate the purpose of your PR. Whether it's a bug fix or a new feature, a detailed description aids in a smoother integration process. 4. Ultralytics Contributor License Agreement (CLA): To uphold the quality and integrity of our project, we require all contributors to sign the CLA. Please confirm your agreement by commenting below: I have read the CLA Document and I sign the CLA For more detailed guidance and best practices on contributing, refer to our ✅ [Contributing Guide](https://docs.ultralytics.com/help/contributing/). Your adherence to these guidelines ensures a faster and more effective review process. --> ## 🛠️ PR Summary <sub>Made with ❤️ by [Ultralytics Actions](https://www.ultralytics.com/actions)</sub> ### 🌟 Summary Standardizes Rust formatting and documentation for the Ultralytics Rust template while publishing a new patch release. 🚀 ### 📊 Key Changes - 🔢 **Version bump**: Increments crate version from `0.0.3` to `0.0.4` in `Cargo.toml`. - 🛡️ **MSRV badge added**: Adds a Crates.io **Minimum Supported Rust Version (MSRV)** badge to `README.md`, linking to `Cargo.toml` for details. - 🧹 **Formatting configuration**: Introduces a `rustfmt.toml` with project-wide Rust formatting rules: - Targets Rust **edition 2024**. - Enables field init shorthand formatting. - Wraps and formats comments (including doc comments) with a wider comment width. - Normalizes doc attributes to `///` style. - Configures grouped, module-level import organization. - Formats macro matchers for cleaner macro code. ### 🎯 Purpose & Impact - 🧭 **Clear Rust version expectations**: MSRV badge helps users and contributors quickly see which Rust version they need, improving compatibility awareness. - 🧑‍💻 **Consistent code style**: Shared `rustfmt` config ensures all contributors produce uniformly formatted code, simplifying reviews and reducing style-related noise in diffs. - 📦 **Release readiness**: Version bump signals a new, slightly improved template release, making it easier to track changes and update downstream projects. - 🧾 **Better docs & readability**: Improved comment and doc formatting leads to clearer documentation and more readable source code for both new and experienced Rust users.
合并状态:未合并 关闭于 2025-11-27 3 条评论