Commit 800e537
docs(guide/dev): refine error handling guidelines for derive_more traits (#366)
* refactor(parsed_value): remove unnecessary `Error` derive
`ParsedValue` is not an error type — it's a display wrapper for
formatted byte values. Remove the unused `Error` derive and update
documentation to clarify that `Display` and `Error` should only be
derived when actually used.
https://claude.ai/code/session_012YdPMpQ3UiSmqFSU2vUULm
* docs: clarify when to derive `Display` and `Error` from `derive_more`
Update CONTRIBUTING.md and AI instruction templates to clarify that
`Display` and `Error` should only be derived when each trait is actually
used, rather than always bundling them together as `#[derive(Debug,
Display, Error)]`.
https://claude.ai/code/session_012YdPMpQ3UiSmqFSU2vUULm
* docs: fix misleading claim about Error not needing Display
`std::error::Error` requires `Display` as a supertrait, so saying "not
all error types need Display" was inaccurate. Simplify the guideline to
focus on the valid point: not all displayable types are errors.
https://claude.ai/code/session_012YdPMpQ3UiSmqFSU2vUULm
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a089cc8 commit 800e537
5 files changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
202 | 205 | | |
203 | 206 | | |
204 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments