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

Fix defaults in onlyargs_derive #34

Merged
merged 5 commits into from
Feb 19, 2024
Merged

Fix defaults in onlyargs_derive #34

merged 5 commits into from
Feb 19, 2024

Conversation

parasyte
Copy link
Owner

  • Fixes default for floats and integers.
  • Fixes struct fields named name (just don't name your field arg_name_ and you'll be ok).
  • Adds regression tests.

This bug was introduced in 0.1.3. Most numeric types (except i32, i64,
and i128) raised an error saying that `From<i32>` is not implemented.
This in embarrassing, but if a struct field is named `name` then the
variable ends up getting shadowed resulting in a compile error.
@parasyte parasyte merged commit bd1a7b9 into main Feb 19, 2024
14 checks passed
@parasyte parasyte deleted the fix/defaults branch February 19, 2024 02:42
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