Skip to content

Rust: Add flow through ? operator #18163

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

Merged
merged 4 commits into from
Dec 4, 2024
Merged

Conversation

paldepind
Copy link
Contributor

Adds flow through the ? operator for Result and Option. For every ? we simply say that it can both read from a Some and an Ok. In reality it will only read from one of these, with the right one in theory being inferable from the types, but I don't think it will lead to much lack of precision.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Nov 29, 2024
@paldepind paldepind marked this pull request as ready for review December 4, 2024 08:25
hvitved
hvitved previously approved these changes Dec 4, 2024
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

Nice!

hvitved
hvitved previously approved these changes Dec 4, 2024
@paldepind paldepind merged commit b7792d6 into github:main Dec 4, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants