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

Make Invalid non-generic #94

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Make Invalid non-generic #94

merged 1 commit into from
Apr 2, 2024

Conversation

dhoepelman
Copy link
Collaborator

ValidationResult was already made covariant in #56. This improves upon that by making Invalid invariant and extend ValidationResult<Nothing>, which is possible since Invalid does not hold the result, only the errors.

Additionally, make map an inline function which improves performance.

@dhoepelman dhoepelman enabled auto-merge (squash) April 2, 2024 12:29
@dhoepelman dhoepelman merged commit 97ddb65 into main Apr 2, 2024
1 check passed
@dhoepelman dhoepelman deleted the covariant_error branch April 2, 2024 12:30
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