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

Rewrite/expansion of slice::split doc examples. #35019

Merged
merged 1 commit into from Jul 27, 2016

Conversation

frewsxcv
Copy link
Member

No description provided.

@frewsxcv
Copy link
Member Author

r? @GuillaumeGomez

/// assert!(iter.next().is_none());
/// ```
///
/// If the first or last element in the slice is matched, an empty slice
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure to understand the last part of the sentence "an empty slice will be returned first or last respectively by the iterator.". An empty slice will be returned first or last?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not too satisfied with the sentence I wrote. I basically wanted to indicate that if the matched element is the first item in the slice, then an empty slice will be returned from the iterator first. Similarly, if the last element is matched, the last item the iterator returns is an empty slice. I was trying to combine that in one sentence.

In case you're not familiar with the word "respectively": http://english.stackexchange.com/questions/138695/when-to-use-respectively

Copy link
Member

Choose a reason for hiding this comment

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

Then write it as is. It doesn't matter if it's long as long as it's clear for the reader.

Copy link
Member

Choose a reason for hiding this comment

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

👍 with just write the two sentences :)

@GuillaumeGomez
Copy link
Member

Before the asserts, could you add a comment with what the slice looks like please?

@frewsxcv
Copy link
Member Author

Before the asserts, could you add a comment with what the slice looks like please?

A little confused what you mean by this. Can you show me an example of what you mean?

@GuillaumeGomez
Copy link
Member

Damn, I have read too quickly. Can you just put an empty line before the asserts instead please? It helps the reading a bit.

@frewsxcv
Copy link
Member Author

Comments have been addressed.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 25, 2016

📌 Commit a139772 has been approved by GuillaumeGomez

@bors
Copy link
Contributor

bors commented Jul 26, 2016

⌛ Testing commit a139772 with merge e0c4bb5...

@bors
Copy link
Contributor

bors commented Jul 26, 2016

💔 Test failed - auto-win-msvc-64-opt

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Jul 26, 2016 at 4:35 AM, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt/builds/5096


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#35019 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95N5TEN2PPqT9emjPTuIi2exDrboYks5qZfEYgaJpZM4JTvHS
.

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 26, 2016
Rewrite/expansion of `slice::split` doc examples.

None
bors added a commit that referenced this pull request Jul 27, 2016
@bors bors merged commit a139772 into rust-lang:master Jul 27, 2016
@frewsxcv frewsxcv deleted the slice-split branch October 2, 2016 23:06
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.

None yet

5 participants