Skip to content

Refine Atomic*::compare_and_swap documentation #26659

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

Merged
merged 1 commit into from
Jun 29, 2015
Merged

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Jun 29, 2015

Namely:

  • Change parameter old to read current so it is clearer what the argument refers to (originally
    suggested expected, but shot down by Steve);
  • Add some formatting and fix some mistakes like referring to the method as swap rather than
    compare_and_swap.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@steveklabnik
Copy link
Member

I'm not sure I like expected here, as that reads to me as what new is, ie, what it's expected to be.

@alexcrichton
Copy link
Member

@bors: r+ 6ef047533bea20ac0d07d9817e20ddb720cb7e68 rollup

Namely:

* Change parameter `old` to read `current` so it is clearer what the argument refers to (originally
    suggested `expected`, but shot down by Steve);
* Add some formatting and fix some mistakes like referring to the method as `swap` rather than
  `compare_and_swap`.
@alexcrichton
Copy link
Member

@bors: r+ 08b2166

@bors
Copy link
Collaborator

bors commented Jun 29, 2015

⌛ Testing commit 08b2166 with merge fe283b4...

bors added a commit that referenced this pull request Jun 29, 2015
Namely:

* Change parameter `old` to read `current` so it is clearer what the argument refers to (originally
   suggested `expected`, but shot down by Steve);
* Add some formatting and fix some mistakes like referring to the method as `swap` rather than
  `compare_and_swap`.
@bors bors merged commit 08b2166 into rust-lang:master Jun 29, 2015
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.

6 participants