docs: remove pattern file index — file names are self-descriptive

This commit is contained in:
2026-05-08 01:10:55 +00:00
parent 5cc77138b2
commit 470c6b3fe3
+1 -16
View File
@@ -15,21 +15,6 @@ These are derived from what the [Rust standard library](https://github.com/rust-
- `patterns/` — what to do (error handling, ownership, traits, concurrency, unsafe, macros, etc.) - `patterns/` — what to do (error handling, ownership, traits, concurrency, unsafe, macros, etc.)
- `smells/` — what NOT to do (anti-patterns, common mistakes) - `smells/` — what NOT to do (anti-patterns, common mistakes)
## Pattern Files
| File | Patterns | Key Topics |
|------|----------|------------|
| [error-handling.md](patterns/error-handling.md) | 10 | Result, ?, Error trait, From, panic! |
| [traits.md](patterns/traits.md) | 10 | Small traits, derive, From/Into, Iterator, Deref |
| [ownership.md](patterns/ownership.md) | 10 | Borrowing, Clone/Copy, Cow, Arc, Drop, lifetimes |
| [documentation.md](patterns/documentation.md) | 10 | Doc comments, # Safety, # Examples, doc tests |
| [concurrency.md](patterns/concurrency.md) | 10 | Send/Sync, Mutex, atomics, channels, scoped threads |
| [testing.md](patterns/testing.md) | 10 | cfg(test), assert_eq!, should_panic, property tests |
| [unsafe-patterns.md](patterns/unsafe-patterns.md) | 10 | // SAFETY:, unsafe fn, MaybeUninit, FFI |
| [api-design.md](patterns/api-design.md) | 10 | Naming, #[non_exhaustive], newtype, typestate |
| [module-organization.md](patterns/module-organization.md) | 10 | File structure, pub use, prelude, workspaces |
| [macros.md](patterns/macros.md) | 10 | macro_rules!, derive, attribute macros, hygiene |
## How to use ## How to use
Give your agent these instructions depending on the task: Give your agent these instructions depending on the task:
@@ -71,7 +56,7 @@ Give your agent these instructions depending on the task:
## Source ## Source
All patterns extracted from `library/` at commit [`f53b654`](https://github.com/rust-lang/rust/tree/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6) (325,000 commits, 8,021 contributors). All patterns extracted from `library/` at commit [`f53b654`](https://github.com/rust-lang/rust/tree/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6).
## Related Repos ## Related Repos