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(derive): allow derive(Arbitrary) for struct Option #194

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

caspermeijn
Copy link
Contributor

Use the full path to core::option::Option and core::default::Default in the generated code. This allows derive(Arbitrary) on structs named Option or Default.

This allows me to derive Arbitrary on prost_types::Option.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

@fitzgen
Copy link
Member

fitzgen commented Sep 10, 2024

Looks like this needs a cargo fmt

Use the full path to `core::option::Option` and `core::default::Default` in the generated code. This allows `derive(Arbitrary)` on structs named `Option` or `Default`.
@caspermeijn
Copy link
Contributor Author

Looks like this needs a cargo fmt

Oops. I didn't run that locally, but fortunately CI caught it :-)

@fitzgen fitzgen merged commit 17647a1 into rust-fuzz:main Sep 10, 2024
5 checks passed
@caspermeijn caspermeijn deleted the derive_option branch September 12, 2024 09:25
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.

2 participants