Skip to content

Rust: Add flow through ? operator#18163

Merged
paldepind merged 4 commits into
github:mainfrom
paldepind:rust-df-try-expr
Dec 4, 2024
Merged

Rust: Add flow through ? operator#18163
paldepind merged 4 commits into
github:mainfrom
paldepind:rust-df-try-expr

Conversation

@paldepind
Copy link
Copy Markdown
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
Copy Markdown
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
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