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 of view callbacks #158

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

george-hopkins
Copy link
Contributor

By allowing view callbacks to return an arbitrary type, users no longer need to use more complex options to pass the result of a computation to the outer scope.

let result = view.matrix_mut(|v| {
    compute_something(v)
});

@GuillaumeGomez
Copy link
Owner

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 9e148b5 into GuillaumeGomez:master Oct 14, 2024
4 of 6 checks passed
@george-hopkins george-hopkins deleted the returnval branch November 8, 2024 11:27
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