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

Cannot add field that's not Arc<...> #13

Closed
Nashenas88 opened this issue Jan 27, 2020 · 0 comments · Fixed by #15
Closed

Cannot add field that's not Arc<...> #13

Nashenas88 opened this issue Jan 27, 2020 · 0 comments · Fixed by #15
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Nashenas88
Copy link
Owner

Currently it's not possible to add a field that's not Arc<...>. This makes sense for fields that are #[inject], but fields that are not #[inject] are also rejected, which should not occur.

The following is rejected, when it should not be:

#[derive(Inject)]
#[provides(Struct with Struct::new())]
struct Struct {
    a: usize,
}

impl Struct {
    fn new() -> Self {
        Self { a: 0 }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant