-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
sync::watch
: Change wording from "unseen" to "changed"
#6014
sync::watch
: Change wording from "unseen" to "changed"
#6014
Conversation
|
@victor-timofei Please check if these API changes are reasonable. @Darksonn This PR could only be merged before 1.33 is released. |
Co-authored-by: Victor Timofei <victor@vtimothy.com>
@victor-timofei I have deliberately decided to keep the existing wording of unseen at other places in the API docs. This synonym with a slightly different perspective helps to understand possible use cases. |
sync::watch
: Change wording from "unseen" to "changed"
tokio/src/sync/watch.rs
Outdated
/// Marks the state as changed. | ||
pub fn mark_changed(&mut self) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation is insufficient.
That said, this should probably have been done in the previous PR. Do you want to update the docs here? Otherwise I'll open an issue for it and merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what is expected here. I have added some docs including a possible use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Motivation
To keep the wording in the API consistent as discussed in #5962.
Solution
Rename the newly added (and yet unreleased) method
mark_unseen()
tomark_changed()
insync::watch::Receiver
.