-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Deprecated/moved functions in collections::str #15426
Conversation
And it finaly passes the Travis build! |
This is changing a core standard library modules, so it should be discussed a bit before merging. I'm in favor of all changes made here. cc @aturon |
Are there any news on this? Should I rebase it? |
@aochagavia Sorry about the delay. This is my fault -- the CC from Alex got lost in my inbox! I am definitely in favor of this change. I would also like to see the The |
Looks like this needs a rebase, but r=me with a rebase. |
Done 😉! |
This should now be fixed. |
I have also fixed that one... No idea why it hasn't been catched by the Travis build... |
The travis builds only exercise functionality on linux, and the bugs have been on windows/osx so these are likely platform-specific modules. |
I could fix this by using |
For the collections tests I would recommend ensuring that the right instance of |
I have compiled and tested the |
Just to be sure, have you run a full |
Yes I have, most test pass but I got a strange error when running
|
Errors like that are normally benign, so let's give this another go |
Thanks again of course! |
No problem! I am the one who benefits most from this 😉! I am really learning a lot here. |
Sorry, I forgot to update some of the code examples of the deprecated functions ( |
Use `String::from_utf8` instead [breaking-change]
Use `String::from_chars` instead [breaking-change]
Use `String::from_char` or `.to_str` instead [breaking-change]
Replaced by `String::from_byte` [breaking-change]
Use `String::from_utf16` instead [breaking-change]
Use `String::from_utf16_lossy` instead. [breaking-change]
Use `String::from_utf8_lossy` instead [breaking-change]
I am sorry it failed again... There were some encoding issues in the code examples (I accidentaly copied some UTF-8 text and pasted it as ASCII), so the assertions failed. It should be ok now. I tried to test this before pushing, but it is really a pain to do since I am on Windows. The tests fail before reaching the code examples of |
* Deprecated `str::from_utf8_owned` in favor of `String::from_utf8` * Deprecated `str::from_utf8_lossy` in favor of `String::from_utf8_lossy` * Deprecated `str::from_utf16` in favor of `String::from_utf16` * Deprecated `str::from_utf16_lossy` in favor of `String::from_utf16_lossy` * Deprecated `str::from_chars` in favor of `String::from_chars` * Deprecated `str::from_char` in favor of `String::from_char` and `.to_string()` * Deprecated `str::from_byte` in favor of `String::from_byte` [breaking-change]
Awesome \o/ |
…_return, r=Veykril minor : Deunwrap convert_to_guarded_return Closes subtask 12 of rust-lang#15398
str::from_utf8_owned
in favor ofString::from_utf8
str::from_utf8_lossy
in favor ofString::from_utf8_lossy
str::from_utf16
in favor ofString::from_utf16
str::from_utf16_lossy
in favor ofString::from_utf16_lossy
str::from_chars
in favor ofString::from_chars
str::from_char
in favor ofString::from_char
and.to_string()
str::from_byte
in favor ofString::from_byte
[breaking-change]