From 9bae6ec828fdc7f87838ee008cccef90e31b9f84 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 30 Apr 2014 23:06:36 -0700 Subject: 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] --- src/libstd/io/mod.rs | 2 +- src/libstd/io/process.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libstd/io') diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 59a8c6f3439..cd069ddc1ea 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -230,7 +230,7 @@ use option::{Option, Some, None}; use owned::Box; use path::Path; use result::{Ok, Err, Result}; -use str::StrSlice; +use str::{StrSlice, StrAllocating}; use str; use uint; use unstable::finally::try_finally; diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs index 1471a049bf3..74f6944f102 100644 --- a/src/libstd/io/process.rs +++ b/src/libstd/io/process.rs @@ -428,7 +428,6 @@ impl Drop for Process { mod tests { use io::process::{ProcessConfig, Process}; use prelude::*; - use str::StrSlice; // FIXME(#10380) these tests should not all be ignored on android. -- cgit 1.4.1-3-g733a5