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

impl SignalWrite for RwSignal #716

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Conversation

macmv
Copy link
Contributor

@macmv macmv commented Dec 29, 2024

impl's SignalWrite for RwSignal.

I find myself writing code like this every so often:

let signal = RwSignal::new(/* ... */);

// later...
signal.write_only().write().borrow_mut().my_mutate_fn(/* ... */);

And, it would be nice to not need to convert my signal to writeonly first:

let signal = RwSignal::new(/* ... */);

// with this change:
signal.write().borrow_mut().my_mutate_fn(/* ... */);

@jrmoulton
Copy link
Collaborator

This is great. Thanks!

@jrmoulton jrmoulton merged commit 3052a51 into lapce:main Jan 2, 2025
7 checks passed
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