You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(guide/dev): remove generic and compiler-enforced sections (#358)
Keep the contributing guide focused on conventions unique to this project
rather than restating standard Rust practices or compiler-enforced rules.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,8 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
11
11
- Use descriptive variable and closure parameter names by default — single letters are only allowed in: conventional names (`n` for count, `f` for formatter), comparison closures (`|a, b|`), trivial single-expression closures, fold accumulators, index variables (`i`/`j`/`k` in short closures or index-based loops only), and test fixtures (identical roles only). Never use single letters in multi-line functions or closures
12
12
- Prefer `where` clauses for multiple trait bounds
Copy file name to clipboardExpand all lines: AGENTS.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,8 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
11
11
- Use descriptive variable and closure parameter names by default — single letters are only allowed in: conventional names (`n` for count, `f` for formatter), comparison closures (`|a, b|`), trivial single-expression closures, fold accumulators, index variables (`i`/`j`/`k` in short closures or index-based loops only), and test fixtures (identical roles only). Never use single letters in multi-line functions or closures
12
12
- Prefer `where` clauses for multiple trait bounds
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,8 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
11
11
- Use descriptive variable and closure parameter names by default — single letters are only allowed in: conventional names (`n` for count, `f` for formatter), comparison closures (`|a, b|`), trivial single-expression closures, fold accumulators, index variables (`i`/`j`/`k` in short closures or index-based loops only), and test fixtures (identical roles only). Never use single letters in multi-line functions or closures
12
12
- Prefer `where` clauses for multiple trait bounds
- Use `pub(crate)` for items shared within the crate but not exposed externally.
209
-
- Default to private for everything else.
210
-
211
199
### Error Handling
212
200
213
201
- Define custom error enums with `#[derive(Debug, Display, Error)]` from `derive_more`.
214
-
- Mark error enums as `#[non_exhaustive]`.
215
202
- Minimize `unwrap()` in non-test code — use proper error propagation. `unwrap()` is acceptable in tests and for provably infallible operations (with a comment explaining why). When deliberately ignoring an error, use `.ok()` with a comment explaining why.
216
203
217
204
```rust
@@ -223,22 +210,9 @@ pub enum RuntimeError {
223
210
}
224
211
```
225
212
226
-
### Documentation Comments
227
-
228
-
- Use `///` doc comments for all public types, traits, functions, and fields.
229
-
- Use `//!` module-level doc comments at the top of `lib.rs` and significant modules.
230
-
- Include usage examples with `/// ```no_run` blocks for key public APIs.
231
-
- Reference related types with `[`backtick links`](crate::path)` syntax.
232
-
233
-
### Feature Gating
234
-
235
-
- Use `#[cfg(feature = "...")]` for optional functionality (e.g., `json`, `cli`).
236
-
- Use `#[cfg(unix)]` for POSIX-specific code.
237
-
- Use `#[cfg_attr(feature = "json", derive(Deserialize, Serialize))]` for conditional derives.
238
-
239
213
### Pattern Matching
240
214
241
-
Use exhaustive matching. When mapping enum variants to values, prefer the concise wrapping style:
215
+
When mapping enum variants to values, prefer the concise wrapping style:
242
216
243
217
```rust
244
218
ExitCode::from(matchself {
@@ -247,18 +221,6 @@ ExitCode::from(match self {
247
221
})
248
222
```
249
223
250
-
### Struct Field Ordering
251
-
252
-
Order fields logically by purpose, not alphabetically. Group related fields together. Document every public field with `///` comments.
253
-
254
-
### Macros
255
-
256
-
Use macros to reduce boilerplate for repetitive patterns (e.g. newtype wrappers, trait impls for multiple numeric types). Keep macros well-scoped and documented.
257
-
258
-
### Warnings Policy
259
-
260
-
The crate uses `#![deny(warnings)]` — all warnings are treated as errors. Code must compile warning-free.
261
-
262
224
## Setup
263
225
264
226
Install the required Rust toolchain and components before running any checks:
0 commit comments