chore(core): impl Eq, Hash for ArkadeAddress#199
Conversation
useful for storing in hashsets, hashmaps, etc
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
🔍 Arkana PR Review —
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ark-core/src/ark_address.rs (1)
10-16:⚠️ Potential issue | 🔴 CriticalRemove
HashandEqfrom the derive list on line 10.The
Hrptype from bech32 0.11.0 does not implementHashorEqtraits. Attempting to derive these traits onArkAddresswill fail at compile time. WhileTweakedPublicKeyandXOnlyPublicKeysupport these traits,Hrpdoes not, blocking the entire derive operation.Consider either removing
Hash, Eqfrom the derive macro or wrappingHrpin a newtype that implements the required traits.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ark-core/src/ark_address.rs` around lines 10 - 16, The derive list on ArkAddress includes Hash and Eq but Hrp (used as the hrp field) does not implement Hash or Eq; remove Hash and Eq from the derive macro on ArkAddress (keep Debug, Clone, Copy, PartialEq) or alternatively wrap Hrp in a newtype that implements Hash and Eq and use that newtype as the hrp field; update references to ArkAddress or the hrp field accordingly and ensure TweakedPublicKey and XOnlyPublicKey remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@ark-core/src/ark_address.rs`:
- Around line 10-16: The derive list on ArkAddress includes Hash and Eq but Hrp
(used as the hrp field) does not implement Hash or Eq; remove Hash and Eq from
the derive macro on ArkAddress (keep Debug, Clone, Copy, PartialEq) or
alternatively wrap Hrp in a newtype that implements Hash and Eq and use that
newtype as the hrp field; update references to ArkAddress or the hrp field
accordingly and ensure TweakedPublicKey and XOnlyPublicKey remain unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 04f98254-862b-4528-abd6-8bd1d9732f6e
📒 Files selected for processing (1)
ark-core/src/ark_address.rs
useful for storing in hashsets, hashmaps, etc
Summary by CodeRabbit