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

libcore: clarify documentation for char_at(_reverse) #5957

Merged
merged 1 commit into from
Apr 19, 2013

Conversation

huonw
Copy link
Member

@huonw huonw commented Apr 19, 2013

The documentation was unclear/wrong: it implies the functions operated on unicode char indices, but they actually operate on byte indices. Also, the char_at_reverse documentation was unclear whether it counted from the beginning or the end (causing #5956).

bors added a commit that referenced this pull request Apr 19, 2013
The documentation was unclear/wrong: it implies the functions operated on unicode char indices, but they actually operate on byte indices. Also, the `char_at_reverse` documentation was unclear whether it counted from the beginning or the end (causing #5956).
@bors bors closed this Apr 19, 2013
@bors bors merged commit 8ae6b33 into rust-lang:incoming Apr 19, 2013
@huonw huonw deleted the core-char-at-doc branch April 19, 2013 14:41
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 28, 2020
… r=yaahc

Adding new lint to prevent usage of 'unwrap' inside functions that re…

### Change
Adding a new lint that will emit a warning when using "unwrap" or "expect" inside a function that returns result.
### Motivation
These functions promote recoverable errors to non-recoverable errors which may be undesirable in code bases which wish to avoid panics.
### Test plan
Running:
`TESTNAME=unwrap_in_result cargo uitest
`---

changelog: none
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.

3 participants