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

resolve E0599 when derived without importing trait into current scope #55

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

colstrom
Copy link
Contributor

Thanks for the time and effort you've put into this crate! ❤️

This fixes an issue when deriving Patch without importing the trait into the current scope.

As a quick illustration of the issue:

#[derive(::struct_patch::Patch)]
struct Data {}

fn main() {
}

This fails to compile with an error that goes something like this:

error[E0599]: no method named `apply` found for struct `Data` in the current scope

So this is just a tiny one-line change that fixes that. I assumed Semantic Versioning or something similar, and bumped the patch version accordingly, since there's no change in functionality or anything.

Also while checking that it all worked, I noticed a minor warning from cargo:

warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`

So I fixed that up too.

If you'd like me to change anything, just let me know! Thanks again for contributing something cool to the ecosystem!

@yanganto yanganto merged commit 25231c2 into yanganto:main Sep 30, 2024
3 checks passed
@yanganto
Copy link
Owner

Thank you every much ❤️

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