ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Remove Nop messages from components #1452

Closed ctm closed 5 days ago

ctm commented 5 days ago

Remove all the easily removed Nop messages that some of the web components have.

I was under the misapprehension that Callback<T> had to return a message due to my learning yew without enough Rust knowledge to see that it's only ones created by a Scope that have that requirement. Since a Scope can be cheaply cloned, it makes sense to just change the Callbacks that return Nop to include a Scope that they can send messages to when there's a message to send. When there's no message to send, do nothing.

This is just something I noticed as I was DRYing the event_row.rs code (#1451). It's no big deal, but it's a perfect little chore to do when I have a small block of time to kill and don't want to bite into something bigger. OTOH, being my mom's minder is significantly fragmenting my time and finding "perfect little chores" may be preventing me from finding a better way to deal with that fragmentation. !Whee

ctm commented 5 days ago

Done. Deploying now, and I didn't see any other nits.