-
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
Rewrite/expansion of slice::split
doc examples.
#35019
Conversation
/// assert!(iter.next().is_none()); | ||
/// ``` | ||
/// | ||
/// If the first or last element in the slice is matched, an empty slice |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
Before the |
A little confused what you mean by this. Can you show me an example of what you mean? |
Damn, I have read too quickly. Can you just put an empty line before the |
Comments have been addressed. |
Thanks! @bors: r+ rollup |
📌 Commit a139772 has been approved by |
⌛ Testing commit a139772 with merge e0c4bb5... |
💔 Test failed - auto-win-msvc-64-opt |
@bors: retry On Tue, Jul 26, 2016 at 4:35 AM, bors notifications@github.com wrote:
|
Rewrite/expansion of `slice::split` doc examples. None
No description provided.