Skip to content

Fix unclear make_mut description #31397

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
Feb 9, 2016
Merged

Conversation

bradfier
Copy link
Contributor

@bradfier bradfier commented Feb 3, 2016

The documentation for the make_mut function on Arc<T> contains a somewhat impenetrable double-negative that I was only able to fully grasp by looking at the implementation. Here's a quick rewrite that reads a lot better.

The sentence "doesn't have one strong reference and no weak references." is a
hard to understand, and it can be much more easily explained. In particular, such a double-negative
could give English as a Second Language users even more trouble than native speakers.

r? @steveklabnik

@steveklabnik
Copy link
Member

@bors: r+ rollup

agreed, thanks!

@bors
Copy link
Collaborator

bors commented Feb 3, 2016

📌 Commit fa74a83 has been approved by steveklabnik

/// Make a mutable reference into the given `Arc<T>` by cloning the inner
/// data if the `Arc<T>` doesn't have one strong reference and no weak
/// references.
/// Make a mutable reference into the given `Arc<T>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make tidy flagged the trailing space here

Changed the description of the `make_mut` copy-on-write behaviour in arc.rs

The sentence "doesn't have one strong reference and no weak references." is a
hard to understand double negative, which can be much more easily explained.
@bradfier
Copy link
Contributor Author

bradfier commented Feb 8, 2016

@steveklabnik My mistake for screwing up the whitespace. Can you re-approve for bors?

@steveklabnik
Copy link
Member

@bors: r+ rollup

no worries, I do it all the time :)

@bors
Copy link
Collaborator

bors commented Feb 8, 2016

📌 Commit 3cafce6 has been approved by steveklabnik

@bors
Copy link
Collaborator

bors commented Feb 8, 2016

⌛ Testing commit 3cafce6 with merge f8fa614...

bors added a commit that referenced this pull request Feb 8, 2016
The documentation for the `make_mut` function on `Arc<T>` contains a somewhat impenetrable double-negative that I was only able to fully grasp by looking at the implementation. Here's a quick rewrite that reads a lot better.

The sentence "doesn't have one strong reference and no weak references." is a
hard to understand, and it can be much more easily explained. In particular, such a double-negative
could give English as a Second Language users even more trouble than native speakers.

r? @steveklabnik
@bors bors merged commit 3cafce6 into rust-lang:master Feb 9, 2016
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.

4 participants