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

Use associated type #1

Merged
merged 1 commit into from
Apr 1, 2023

Conversation

jprochazk
Copy link
Contributor

@jprochazk jprochazk commented Apr 1, 2023

This is based on the idea in jprochazk/garde#12 (comment). It seems to work. Also doesn't require any changes to garde's API. What do you think?

WithValidation(value, Default::default())
}
}
pub struct WithValidation<E: IntoInner>(pub Valid<<E as IntoInner>::Inner>);
Copy link
Owner

Choose a reason for hiding this comment

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

Oh I didn't know this was possible

@Altair-Bueno Altair-Bueno merged commit f5abf18 into Altair-Bueno:master Apr 1, 2023
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