-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fixed typo in doc comments for swap_remove #41019
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BurntSushi (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks! @steveklabnik Thoughts on the re-wording suggested by @mandeep? Either variant seems fine to me. |
I agree that'd be a bit better; I think it ended up as a run-on due to trying to provide everything in the summary sentence. If we changed it to that, we'd split them up. That is:
I think I might write:
If it's removed, then it's mutated, so this is redundant, and "from anywhere" also feels a bit redundant to me. If you like either of these, you should add them onto this PR 👍 |
Thanks! I like your version so I've added a commit with the changes. |
@bors r+ |
📌 Commit f74ca38 has been approved by |
@mandeep Thanks! |
…BurntSushi Fixed typo in doc comments for swap_remove While reading the Vec docs, I came across the docs for swap_remove. I believe there is a typo in the comment and ```return``` should be ```returns```. This PR fixes this issue. I also feel that the entire doc comment is a bit of a run-on and could be changed to something along the lines of ```Removes an element from anywhere in the vector and returns it. The vector is mutated and the removed element is replaced by the last element of the vector. ``` Thoughts?
Looks like our tidy checker wants a line wrapped here:
@bors r- |
@frewsxcv My fault! I've pushed a commit with the trailing whitespace removed. |
Looks great, thanks! @bors r=BurntSushi rollup |
📌 Commit 5787808 has been approved by |
…BurntSushi Fixed typo in doc comments for swap_remove While reading the Vec docs, I came across the docs for swap_remove. I believe there is a typo in the comment and ```return``` should be ```returns```. This PR fixes this issue. I also feel that the entire doc comment is a bit of a run-on and could be changed to something along the lines of ```Removes an element from anywhere in the vector and returns it. The vector is mutated and the removed element is replaced by the last element of the vector. ``` Thoughts?
…BurntSushi Fixed typo in doc comments for swap_remove While reading the Vec docs, I came across the docs for swap_remove. I believe there is a typo in the comment and ```return``` should be ```returns```. This PR fixes this issue. I also feel that the entire doc comment is a bit of a run-on and could be changed to something along the lines of ```Removes an element from anywhere in the vector and returns it. The vector is mutated and the removed element is replaced by the last element of the vector. ``` Thoughts?
…BurntSushi Fixed typo in doc comments for swap_remove While reading the Vec docs, I came across the docs for swap_remove. I believe there is a typo in the comment and ```return``` should be ```returns```. This PR fixes this issue. I also feel that the entire doc comment is a bit of a run-on and could be changed to something along the lines of ```Removes an element from anywhere in the vector and returns it. The vector is mutated and the removed element is replaced by the last element of the vector. ``` Thoughts?
…BurntSushi Fixed typo in doc comments for swap_remove While reading the Vec docs, I came across the docs for swap_remove. I believe there is a typo in the comment and ```return``` should be ```returns```. This PR fixes this issue. I also feel that the entire doc comment is a bit of a run-on and could be changed to something along the lines of ```Removes an element from anywhere in the vector and returns it. The vector is mutated and the removed element is replaced by the last element of the vector. ``` Thoughts?
While reading the Vec docs, I came across the docs for swap_remove. I believe there is a typo in the comment and
return
should bereturns
. This PR fixes this issue.I also feel that the entire doc comment is a bit of a run-on and could be changed to something along the lines of
Removes an element from anywhere in the vector and returns it. The vector is mutated and the removed element is replaced by the last element of the vector.
Thoughts?