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]
This commit is contained in:
@@ -49,7 +49,7 @@ use str::{Str, SendStr, IntoMaybeOwned};
|
||||
|
||||
#[cfg(test)] use any::{AnyOwnExt, AnyRefExt};
|
||||
#[cfg(test)] use result;
|
||||
#[cfg(test)] use str::StrSlice;
|
||||
#[cfg(test)] use str::StrAllocating;
|
||||
|
||||
/// Indicates the manner in which a task exited.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user