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

Preserve reduce_mut return value #68

Merged
merged 1 commit into from
Dec 10, 2023
Merged

Conversation

intendednull
Copy link
Owner

Previously the returned value of reduce_mut was dropped. Now that value is returned to the caller:

let previous_count = dispatch.reduce_mut(|state| {
    let previous_count = state.count;
    
    state.count += 1;

    previous_count
});

@intendednull intendednull changed the title Pass reduce_mut return type back to user Preserve reduce_mut return value Dec 10, 2023
@intendednull intendednull merged commit b1028d1 into master Dec 10, 2023
@intendednull intendednull deleted the reduce_mut_return_type branch December 10, 2023 22:15
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.

None yet

1 participant