Skip to content

chore(internals): remove unnecesary code in internals::macros#513

Open
ZocoLini wants to merge 1 commit intov0.42-devfrom
chore/internal-cleanup
Open

chore(internals): remove unnecesary code in internals::macros#513
ZocoLini wants to merge 1 commit intov0.42-devfrom
chore/internal-cleanup

Conversation

@ZocoLini
Copy link
Collaborator

@ZocoLini ZocoLini commented Mar 10, 2026

Summary by CodeRabbit

  • Chores

    • Removed several public convenience methods, trait-based conversions, and a compile-time assertion macro. This may affect code that relied on those conveniences.
  • Refactor

    • Internal API surface simplified; no new user-facing features added.

Note: Review and update downstream usage if you depend on the removed conveniences.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0b831dbd-227c-4fbe-8a02-bdf41b35c942

📥 Commits

Reviewing files that changed from the base of the PR and between 306c04d and 4e1923e.

📒 Files selected for processing (1)
  • internals/src/macros.rs
💤 Files with no reviewable changes (1)
  • internals/src/macros.rs

📝 Walkthrough

Walkthrough

This change deletes public convenience methods (as_ptr, as_mut_ptr, len, is_empty), several trait implementations (From, Borrow, BorrowMut variants), and the exported const_assert macro from internals/src/macros.rs (67 lines removed).

Changes

Cohort / File(s) Summary
Macro & wrapper removals
internals/src/macros.rs
Removed wrapper convenience methods (as_ptr, as_mut_ptr, len, is_empty), removed From<&[$ty; $len]> and Borrow/BorrowMut implementations for [$ty; $len] and [$ty], and removed exported const_assert macro.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through code at break of day,
Snipped out the bits that led astray,
Fewer branches, clearer ground,
A lighter hop, a gentler bound. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing unnecessary code from the macros module in the internals crate, which is clearly supported by the removal of 67 lines including convenience methods, trait implementations, and the const_assert macro.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/internal-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ZocoLini ZocoLini force-pushed the chore/internal-cleanup branch from 306c04d to 4e1923e Compare March 10, 2026 18:22
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.91%. Comparing base (98988cc) to head (4e1923e).
⚠️ Report is 6 commits behind head on v0.42-dev.

Additional details and impacted files
@@              Coverage Diff              @@
##           v0.42-dev     #513      +/-   ##
=============================================
+ Coverage      66.86%   66.91%   +0.04%     
=============================================
  Files            313      313              
  Lines          64775    64728      -47     
=============================================
  Hits           43314    43314              
+ Misses         21461    21414      -47     
Flag Coverage Δ *Carryforward flag
core 75.02% <ø> (+0.09%) ⬆️
dash-network 75.01% <ø> (+0.09%) ⬆️ Carriedforward from 98988cc
dash-network-ffi 34.74% <ø> (ø) Carriedforward from 98988cc
dash-spv 68.29% <ø> (+0.10%) ⬆️ Carriedforward from 98988cc
dash-spv-ffi 34.74% <ø> (ø) Carriedforward from 98988cc
dashcore 75.01% <ø> (+0.09%) ⬆️ Carriedforward from 98988cc
dashcore-private 75.01% <ø> (+0.09%) ⬆️ Carriedforward from 98988cc
dashcore-rpc 19.92% <ø> (ø) Carriedforward from 98988cc
dashcore-rpc-json 19.92% <ø> (ø) Carriedforward from 98988cc
dashcore_hashes 75.01% <ø> (+0.09%) ⬆️ Carriedforward from 98988cc
ffi 35.98% <ø> (ø)
key-wallet 65.69% <ø> (ø) Carriedforward from 98988cc
key-wallet-ffi 34.74% <ø> (ø) Carriedforward from 98988cc
key-wallet-manager 65.69% <ø> (ø) Carriedforward from 98988cc
rpc 19.92% <ø> (ø)
spv 81.13% <ø> (+0.12%) ⬆️
wallet 65.69% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
internals/src/macros.rs 37.50% <ø> (+20.19%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant