Skip to content

refactor: use macros for WordCount#789

Merged
reez merged 1 commit intobitcoindevkit:masterfrom
reez:mro
Jul 7, 2025
Merged

refactor: use macros for WordCount#789
reez merged 1 commit intobitcoindevkit:masterfrom
reez:mro

Conversation

@reez
Copy link
Copy Markdown
Collaborator

@reez reez commented Jun 26, 2025

Description

Migrate WordCount to use proc macro

Notes to the reviewers

Unfortunately lib.rs required type alias thing, but this is the same pattern used for KeychainKind in types.rs. The type alias is necessary because we can't have both an import and an enum definition with the same name in the same scope.

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez reez requested a review from ItoroD June 30, 2025 14:26
@reez reez marked this pull request as ready for review June 30, 2025 14:26
@reez reez changed the title (draft) refactor: use macros for WordCount refactor: use macros for WordCount Jun 30, 2025
Comment thread bdk-ffi/src/lib.rs Outdated
use bdk_wallet::keys::bip39::WordCount;
use bdk_wallet::KeychainKind;

type WordCount = bdk_wallet::keys::bip39::WordCount;
Copy link
Copy Markdown
Collaborator

@ItoroD ItoroD Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good. One small question is why is this put in lib.rs and not type.rs?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, updated 👍

Copy link
Copy Markdown
Collaborator

@ItoroD ItoroD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e449942

@reez
Copy link
Copy Markdown
Collaborator Author

reez commented Jul 7, 2025

had to rebase, will merge this first when ci passes

@reez reez merged commit e037568 into bitcoindevkit:master Jul 7, 2025
24 checks passed
@reez reez deleted the mro branch July 7, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants