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

Change from_utf8_owned() to return Result #14213

Merged
merged 2 commits into from
May 16, 2014

Conversation

lilyball
Copy link
Contributor

Change str::from_utf8_owned() and StrBuf::from_utf8() to return Result.

This allows the vector to be recovered when it contains invalid UTF-8.

lilyball added 2 commits May 14, 2014 17:35
This allows the original vector to be recovered in the event that it is
not valid UTF-8.

[breaking-change]
This allows the original vector to be recovered in the event that it is
not UTF-8.

[breaking-change]
bors added a commit that referenced this pull request May 16, 2014
Change `str::from_utf8_owned()` and `StrBuf::from_utf8()` to return `Result`.

This allows the vector to be recovered when it contains invalid UTF-8.
@bors bors closed this May 16, 2014
@bors bors merged commit ba7844a into rust-lang:master May 16, 2014
@lilyball lilyball deleted the str_from_utf8_result branch May 16, 2014 06:12
lnicola pushed a commit to lnicola/rust that referenced this pull request Mar 13, 2023
add: clean api to get `raw_ptr` type

There doesn't seem to be an API to fetch the type of `raw_ptr`, which is helpful for a project I work on.

Notes:

- I am unsure about the function name, do let me know if I should use something else.
- Also unsure about where to add tests, for hir changes. Will fix it as needed.
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