Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AtomSetOnce incomplete documentation #12

Open
garfieldnate opened this issue Mar 4, 2020 · 1 comment
Open

AtomSetOnce incomplete documentation #12

garfieldnate opened this issue Mar 4, 2020 · 1 comment

Comments

@garfieldnate
Copy link

The documentation for AtomSetOnce stops mid-sentence with Meaning that AtomSetOnce is not usable as a... . I would love to know how this sentence ends. The suspense is killing me! :D Seriously, though, what is AtomSetOnce not usable as? That would be pretty useful information to have.

@jonathanGB
Copy link

I would also point out that the documentation for AtomSetOnce::set_if_none is incorrect:

This will do a CAS setting the value only if it is NULL this will return OK(()) if the value was written, otherwise a Err(P) will be returned, where the value was the same value that you passed into this function.

In reality, the function returns an Option<P>, just like Atom::set_if_none. I could submit a PR with a fix to the library to actually mimic what is documented.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants