-
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
Added CharIndices::offset function #82585
Conversation
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Thanks @TrolledWoods, this looks reasonable to me. Could you please open a tracking issue here: https://github.com/rust-lang/rust/issues/new/choose, then update the unstable
attribute with the issue number?
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.
Thanks!
@bors r+ |
📌 Commit fa1624c has been approved by |
⌛ Testing commit fa1624c with merge cd1fa0688543de3442a665f7c7f3a5d6d1c10544... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
Added CharIndices::offset function The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to. You can already do something like ``char_indices.next().map(|(offset, _)| offset)``, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length. I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird.
Added CharIndices::offset function The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to. You can already do something like ``char_indices.next().map(|(offset, _)| offset)``, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length. I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird.
Added CharIndices::offset function The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to. You can already do something like ``char_indices.next().map(|(offset, _)| offset)``, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length. I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird.
Added CharIndices::offset function The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to. You can already do something like ``char_indices.next().map(|(offset, _)| offset)``, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length. I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird.
☀️ Test successful - checks-actions |
The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to.
You can already do something like
char_indices.next().map(|(offset, _)| offset)
, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length.I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird.