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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-19Lines changed: 1 addition & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,7 +211,6 @@ where
211
211
### Error Handling
212
212
213
213
- Define custom error enums with `#[derive(Debug, Display, Error)]` from `derive_more`.
214
-
- Mark error enums as `#[non_exhaustive]`.
215
214
- 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
215
217
216
```rust
@@ -223,22 +222,9 @@ pub enum RuntimeError {
223
222
}
224
223
```
225
224
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
225
### Pattern Matching
240
226
241
-
Use exhaustive matching. When mapping enum variants to values, prefer the concise wrapping style:
227
+
When mapping enum variants to values, prefer the concise wrapping style:
242
228
243
229
```rust
244
230
ExitCode::from(matchself {
@@ -255,10 +241,6 @@ Order fields logically by purpose, not alphabetically. Group related fields toge
255
241
256
242
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
243
258
-
### Warnings Policy
259
-
260
-
The crate uses `#![deny(warnings)]` — all warnings are treated as errors. Code must compile warning-free.
261
-
262
244
## Setup
263
245
264
246
Install the required Rust toolchain and components before running any checks:
0 commit comments