Skip to content
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

Minor cleanup for slice::Chunks and ChunksMut #47113

Merged
merged 2 commits into from
Jan 3, 2018

Conversation

sdroege
Copy link
Contributor

@sdroege sdroege commented Jan 2, 2018

This only renames the size field to chunk_size in one of them for consistency, and changes an assertion to check for != 0 instead of > 0.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dtolnay (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.

@@ -348,9 +348,9 @@ impl<T> SliceExt for [T] {
}

#[inline]
fn chunks(&self, size: usize) -> Chunks<T> {
fn chunks(&self, chunk_size: usize) -> Chunks<T> {
assert!(size != 0);
Copy link
Member

Choose a reason for hiding this comment

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

size here needs to be updated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, thanks. Sorry for that!

@sdroege
Copy link
Contributor Author

sdroege commented Jan 2, 2018

Also fixed another case of size in the documentation of both structs

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay
Copy link
Member

dtolnay commented Jan 3, 2018

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 3, 2018

📌 Commit c096b3a has been approved by dtolnay

kennytm added a commit to kennytm/rust that referenced this pull request Jan 3, 2018
Minor cleanup for slice::Chunks and ChunksMut

This only renames the `size` field to `chunk_size` in one of them for consistency, and changes an assertion to check for != 0 instead of > 0.
bors added a commit that referenced this pull request Jan 3, 2018
Rollup of 9 pull requests

- Successful merges: #47104, #47107, #47113, #47117, #47118, #47121, #47125, #47134, #47145
- Failed merges:
@bors bors merged commit c096b3a into rust-lang:master Jan 3, 2018
sdroege added a commit to sdroege/rust that referenced this pull request Jan 3, 2018
rust-lang#47113 renamed the private size
field to chunk_size for consistency.
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.

5 participants