watch: modify and send value conditionally (#4591)
watch: modify and send value conditionally (#4591)

Add a function that is more versatile than send_modify(). The result of
the passed closure indicates if the mutably borrowed value has actually
been modified or not. Receivers are only notified if the value has been
modified as indicated by the sender.

Signed-off-by: Uwe Klotz <70f5931a31df28c6ea89d279d06e2617add3adba@slowtec.de>
tokio-rs/tokio,tokio-rs/tokio