We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@Kyuuhachi says:
I like to include that clause when I make a project-local ensure macro
"That clause" means something like this:
ensure!(let Some(x) = y, SomeSnafu);
This could expand into something like
let Some(x) = y else { return SomeSnafu.fail() };
To consider is if there's a way to do it with something besides let-else, which only stabilized in 1.65.
The text was updated successfully, but these errors were encountered:
(Just passing through, leaving my 2 cents) Isn't let Some(x) = y else { return SomeSnafu.fail() }; just sugar for
let x = match y { Some(x) => x, _ => return SomeSnafu.fail(), }
But that would probably require a more sophisticated macro definition, as it would need to deconstruct the "that clause"
Sorry, something went wrong.
No branches or pull requests
@Kyuuhachi says:
"That clause" means something like this:
This could expand into something like
To consider is if there's a way to do it with something besides let-else, which only stabilized in 1.65.
The text was updated successfully, but these errors were encountered: