refactor: deprecate Show for Option, migrate to Debug#3436
Open
refactor: deprecate Show for Option, migrate to Debug#3436
Conversation
Collaborator
Coverage Report for CI Build 3889Coverage decreased (-0.2%) to 94.729%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show (Display) for Option has no meaningful string representation, following the same reasoning as Rust's stdlib. Deprecate both the Show impl for Option and Option::to_string. Migrate all call sites from inspect to debug_inspect or guard patterns. Add Debug impls for JsonDecodeError, JsonPath, and Reverse. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Suppress deprecation warnings on structs with Option fields that derive Show (ArgsLoc, Entry, value_range) - Remove unused Eq impl for Entry - Add Debug impls for Reverse, JsonDecodeError, JsonPath - Fix all remaining inspect→debug_inspect and assert_eq→@test.assert_eq - Update expected test content strings for Debug format differences Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c21e49c to
a6b0434
Compare
a6b0434 to
4d7ee58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Showimpl forOptionandOption::to_string— Option has no meaningful Display representation (same reasoning as Rust's stdlib)inspecttodebug_inspectorguard ... ispatternsDebugimpls forJsonDecodeError,JsonPath, and@cmp.ReverseTest plan
moon checkpasses (0 errors, 77 remaining deprecation warnings from structural uses)moon testpasses (6319/6319 tests)🤖 Generated with Claude Code