Uh oh!
There was an error while loading. Please reload this page.
More methods for str boxes. (reduce Box<[u8]> ↔ Box<str> transmutes) - #41258
Conversation
rust-highfive
commented
Apr 12, 2017
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
6ab4281 to
294ee7eCompare62b6205 to
15a8d38Compare116c9be to
112459dCompareshepmaster
commented
Apr 14, 2017
arielb1
commented
Apr 18, 2017
Thanks for the PR @clarcharr! Sorry for the delay - half of the team was on spring vacation. @Kimundi or some other reviewer will be looking at your PR soon. |
clarfonthey
commented
Apr 18, 2017
No problem! Whenever someone gets around to it. :) |
bors
commented
Apr 19, 2017
📌 Commit 112459d has been approved by |
bors
commented
Apr 20, 2017
☔ The latest upstream changes (presumably #41411) made this pull request unmergeable. Please resolve the merge conflicts. |
frewsxcv
commented
Apr 20, 2017
FYI, my PR #41295 just landed which made a couple organizational changes to the Unstable Book. Namely, features are now divided into 'language features' and 'library features' which are different directories, so you'll unfortunately have to address the conflicts. You should be able to just run |
bors
commented
Apr 20, 2017
🔒 Merge conflict |
112459d to
cd605beCompareclarfonthey
commented
Apr 20, 2017
Just rebased! |
cd605be to
9a37ac7Compareclarfonthey
commented
Apr 21, 2017
(Rebased a second time and now it passes.) |
alexcrichton
commented
Apr 21, 2017
Hm so looking this over, I fear that we're getting too aggressive with all of these conversions. For example functions like |
clarfonthey
commented
Apr 21, 2017
That makes sense! I can remove that function for now if that seems best. |
alexcrichton
commented
Apr 21, 2017
Ok, let's remove that function. |
9a37ac7 to
717e06fCompareclarfonthey
commented
Apr 21, 2017
Removed for now. I also marked the |
alexcrichton
commented
Apr 24, 2017
Looks like Travis is failing? |
717e06f to
c66c6e9Compareclarfonthey
commented
Apr 24, 2017
Hopefully it should be fixed once Travis finishes! |
clarfonthey
commented
Apr 25, 2017
(Travis passes.) |
alexcrichton
commented
Apr 26, 2017
@bors: r=Kimundi |
bors
commented
Apr 26, 2017
📌 Commit c66c6e9 has been approved by |
bors
commented
Apr 26, 2017
More methods for str boxes. (reduce Box<[u8]> ↔ Box<str> transmutes) This is a follow-up to #41096 that adds safer methods for converting between `Box<str>` and `Box<[u8]>`. They're gated under a different feature from the `&mut str` methods because they may be too niche to include in public APIs, although having them internally helps reduce the number of transmutes the standard library uses. What's added: * `From<Box<str>> for Box<[u8]>` * `<Box<str>>::into_boxed_bytes` (just calls `Into::into`) * `alloc::str` (new module) * `from_boxed_utf8` and `from_boxed_utf8_unchecked`, defined in `alloc:str`, exported in `collections::str` * exports `from_utf8_mut` in `collections::str` (missed from previous PR)
bors
commented
Apr 26, 2017
☀️ Test successful - status-appveyor, status-travis |
This is a follow-up to #41096 that adds safer methods for converting between
Box<str>andBox<[u8]>. They're gated under a different feature from the&mut strmethods because they may be too niche to include in public APIs, although having them internally helps reduce the number of transmutes the standard library uses.What's added:
From<Box<str>> for Box<[u8]><Box<str>>::into_boxed_bytes(just callsInto::into)alloc::str(new module)from_boxed_utf8andfrom_boxed_utf8_unchecked, defined inalloc:str, exported incollections::strfrom_utf8_mutincollections::str(missed from previous PR)