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

pass return values from the closure to the caller #13

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

sonodima
Copy link
Owner

@sonodima sonodima commented Oct 3, 2024

No description provided.

@sonodima sonodima merged commit 215be04 into master Oct 3, 2024
2 checks passed
@sonodima sonodima deleted the chore/closure-ret-val branch October 3, 2024 18:18
@RivenSkaye
Copy link
Contributor

Wait, if I'm reading this right, I can now directly do let my_dangerous_wintype = try_seh(some_fn())? That'd be amazing, I could delete my hacky macro to do this for every invocation then!

@sonodima
Copy link
Owner Author

sonodima commented Oct 6, 2024

That's correct, you would now be able to do stuff like:

fn fallible() -> NTSTATUS {
  ...
  STATUS_SUCCESS
}

let status = try_seh(fallible).unwrap();

RivenSkaye added a commit to RivenSkaye/WinMMF-rs that referenced this pull request Oct 7, 2024
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