Skip to content

refactor(common): deduplicate alignment validation assertions#584

Open
viktorking7 wants to merge 1 commit intonexus-xyz:mainfrom
viktorking7:patch-3
Open

refactor(common): deduplicate alignment validation assertions#584
viktorking7 wants to merge 1 commit intonexus-xyz:mainfrom
viktorking7:patch-3

Conversation

@viktorking7
Copy link

Is this resolving a feature or a bug?

Refactoring: code deduplication.

Are there existing issue(s) that this PR would close?

No.

If this PR is not minimal (it could be split into multiple PRs), please explain why the issues are best resolved together.

N/A — this is a minimal, single-purpose refactoring.

Describe your changes.

Extracts duplicated debug_assert! validation logic for alignment constants into helper functions, eliminating 6 identical assertion blocks across Alignable implementations for u32 and usize.

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