Skip to content

Commit 2934ba7

Browse files
committed
docs: remove import order rules enforced by cargo fmt
Import ordering is already enforced automatically by cargo fmt, so documenting it separately is redundant and risks going stale. https://claude.ai/code/session_01MHKaZm6DcA9kjBPnW3KN5K
1 parent c1fd4eb commit 2934ba7

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
66

77
- Commit format: Conventional Commits — `type(scope): lowercase description`
88
- Version releases are the only exception: just the version number (e.g. `0.21.1`)
9-
- Import order: internal (`crate::`/`super::`) first, then external crates and `std::` together (alphabetical, enforced by `cargo fmt`), prefer merged imports
9+
- Prefer merged imports
1010
- Use descriptive generic names (`Size`, `Report`), not single letters
1111
- Prefer `where` clauses for multiple trait bounds
1212
- Derive order: std traits → comparison traits → `Hash` → derive_more → feature-gated

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
66

77
- Commit format: Conventional Commits — `type(scope): lowercase description`
88
- Version releases are the only exception: just the version number (e.g. `0.21.1`)
9-
- Import order: internal (`crate::`/`super::`) first, then external crates and `std::` together (alphabetical, enforced by `cargo fmt`), prefer merged imports
9+
- Prefer merged imports
1010
- Use descriptive generic names (`Size`, `Report`), not single letters
1111
- Prefer `where` clauses for multiple trait bounds
1212
- Derive order: std traits → comparison traits → `Hash` → derive_more → feature-gated

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
66

77
- Commit format: Conventional Commits — `type(scope): lowercase description`
88
- Version releases are the only exception: just the version number (e.g. `0.21.1`)
9-
- Import order: internal (`crate::`/`super::`) first, then external crates and `std::` together (alphabetical, enforced by `cargo fmt`), prefer merged imports
9+
- Prefer merged imports
1010
- Use descriptive generic names (`Size`, `Report`), not single letters
1111
- Prefer `where` clauses for multiple trait bounds
1212
- Derive order: std traits → comparison traits → `Hash` → derive_more → feature-gated

CONTRIBUTING.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,7 @@ Automated tools enforce formatting (`cargo fmt`) and linting (`cargo clippy`). T
3232

3333
### Import Organization
3434

35-
Prefer **merged imports** — combine multiple items from the same crate or module into a single `use` statement with braces rather than separate `use` lines.
36-
37-
Imports are grouped in this order, separated by blank lines:
38-
39-
1. `use super::...` or `use crate::...` (internal)
40-
2. All other imports — external crates and `std::` together, sorted alphabetically
41-
42-
`cargo fmt` enforces alphabetical ordering across external and `std` imports (it does not distinguish between them). Platform-specific imports (`#[cfg(unix)]`) go in a separate block after the main imports.
35+
Prefer **merged imports** — combine multiple items from the same crate or module into a single `use` statement with braces rather than separate `use` lines. Import ordering is enforced by `cargo fmt`. Platform-specific imports (`#[cfg(unix)]`) go in a separate block after the main imports.
4336

4437
```rust
4538
use crate::{

0 commit comments

Comments
 (0)