Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code using helper macros str_strip_0x push_if_some def_with_opt_param #2253

Open
dimxy opened this issue Oct 24, 2024 · 0 comments
Open

Comments

@dimxy
Copy link
Collaborator

dimxy commented Oct 24, 2024

A few helper macros were added which make code more compact:

  • str_strip_0x - strips 0x prefix from str with hex
  • push_if_some - pushes (key, value as string) into array if value is Some
  • def_with_opt_param - adds a with_... method in a struct implementing Builder pattern

Suggestion is to use these macros throughout the codebase.

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

No branches or pull requests

1 participant