Skip to content

Commit 9bae6ec

Browse files
committed
core: Inherit possible string functionality
This moves as much allocation as possible from teh std::str module into core::str. This includes essentially all non-allocating functionality, mostly iterators and slicing and such. This primarily splits the Str trait into only having the as_slice() method, adding a new StrAllocating trait to std::str which contains the relevant new allocation methods. This is a breaking change if any of the methods of "trait Str" were overriden. The old functionality can be restored by implementing both the Str and StrAllocating traits. [breaking-change]
1 parent 544d909 commit 9bae6ec

File tree

18 files changed

+2027
-1993
lines changed

18 files changed

+2027
-1993
lines changed

src/libcore/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ pub mod option;
7171
pub mod raw;
7272
pub mod char;
7373
pub mod slice;
74+
pub mod str;
7475
pub mod tuple;

0 commit comments

Comments
 (0)