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

Remove custom NeverOkResult trait and instead use new Rust 1.82 matching #69

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

faern
Copy link
Member

@faern faern commented Oct 27, 2024

In Rust 1.82 we finally get to omit impossible branches in pattern matching: https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#omitting-empty-types-in-pattern-matching

This PR utilize that in order to get rid of the custom NeverOkResult trait.

This is not an important change, nor is it a high priority. We might want to wait with merging this until we use Rust 1.82 in the main repo. Just so we don't block ourselves from upgrading to the latest udp-over-tcp in case we need it. I just realized this potential cleanup and wanted to submit a PR while I had it on the top of my mind :)


This change is Reviewable

@faern faern requested a review from dlon October 27, 2024 18:06
@faern faern force-pushed the new-pattern-matching-on-infallible branch from 62b5da2 to e0c6b2e Compare October 27, 2024 20:23
Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

:lgtm:

This is pretty cool. :)

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @faern)

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