refactor(dash-spv): drop description(), use Display for events#758
refactor(dash-spv): drop description(), use Display for events#758xdustinface wants to merge 1 commit into
description(), use Display for events#758Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThree event types— ChangesEvent Display Trait Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.42-dev #758 +/- ##
=============================================
- Coverage 72.26% 72.25% -0.02%
=============================================
Files 320 320
Lines 70275 70274 -1
=============================================
- Hits 50785 50777 -8
- Misses 19490 19497 +7
|
|
This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them. |
Fold the inherent `description() -> String` methods on `SyncEvent`, `NetworkEvent`, and `WalletEvent` into their `Display::fmt` bodies, and update every caller to format the event directly (`{event}` instead of `{event.description()}`). `write!` replaces the per-arm `format!` to avoid the intermediate `String` allocation.
Output is byte-for-byte identical. No new public API, just the existing `Display` impl carrying the formatting instead of a parallel inherent method.
6d1b610 to
6d63e9d
Compare
Fold the inherent
description() -> Stringmethods onSyncEvent,NetworkEvent, andWalletEventinto theirDisplay::fmtbodies, and update every caller to format the event directly ({event}instead of{event.description()}).write!replaces the per-armformat!to avoid the intermediateStringallocation.Output is byte-for-byte identical. No new public API, just the existing
Displayimpl carrying the formatting instead of a parallel inherent method.Summary by CodeRabbit