diff options
| author | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-19 11:34:51 +0200 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-07-24 07:25:43 -0700 |
| commit | ba707fb3a0735c0ca19baac426b88218c656a34b (patch) | |
| tree | f147d5668a03e47882796b7a7b5446de95112993 /src/libstd | |
| parent | 482c776d5a705d62a8093f2a441919278eb2b1d0 (diff) | |
| download | rust-ba707fb3a0735c0ca19baac426b88218c656a34b.tar.gz rust-ba707fb3a0735c0ca19baac426b88218c656a34b.zip | |
Remove OwnedStr trait
This trait was only implemented by `String`. It provided the methods `into_bytes` and `append`, both of which **are already implemented as normal methods** of `String` (not as trait methods). This change improves the consistency of strings. This shouldn't break any code, except if somebody has implemented `OwnedStr` for a user-defined type.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ascii.rs | 2 | ||||
| -rw-r--r-- | src/libstd/os.rs | 4 | ||||
| -rw-r--r-- | src/libstd/prelude.rs | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 02cb5dd245b..bcc0761d92a 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -20,7 +20,7 @@ use iter::Iterator; use mem; use option::{Option, Some, None}; use slice::{ImmutableVector, MutableVector, Vector}; -use str::{OwnedStr, Str, StrAllocating, StrSlice}; +use str::{Str, StrAllocating, StrSlice}; use string::String; use to_string::IntoStr; use vec::Vec; diff --git a/src/libstd/os.rs b/src/libstd/os.rs index f71f1d22d00..ca76be40cb5 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -56,8 +56,6 @@ use vec::Vec; use c_str::ToCStr; #[cfg(unix)] use libc::c_char; -#[cfg(windows)] -use str::OwnedStr; /// Get the number of cores available pub fn num_cpus() -> uint { @@ -708,8 +706,6 @@ pub fn self_exe_name() -> Option<Path> { #[cfg(windows)] fn load_self() -> Option<Vec<u8>> { - use str::OwnedStr; - unsafe { use os::win32::fill_utf16_buf_and_decode; fill_utf16_buf_and_decode(|buf, sz| { diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs index 0ce7497cf30..96d5c0785f4 100644 --- a/src/libstd/prelude.rs +++ b/src/libstd/prelude.rs @@ -76,7 +76,7 @@ #[doc(no_inline)] pub use path::{GenericPath, Path, PosixPath, WindowsPath}; #[doc(no_inline)] pub use ptr::RawPtr; #[doc(no_inline)] pub use io::{Buffer, Writer, Reader, Seek}; -#[doc(no_inline)] pub use str::{Str, StrVector, StrSlice, OwnedStr}; +#[doc(no_inline)] pub use str::{Str, StrVector, StrSlice}; #[doc(no_inline)] pub use str::{IntoMaybeOwned, StrAllocating, UnicodeStrSlice}; #[doc(no_inline)] pub use to_string::{ToString, IntoStr}; #[doc(no_inline)] pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4}; |
