diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-09-17 12:56:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-09-21 22:15:51 -0700 |
| commit | 0169218047dc989acf9ea25e3122b9c659acb6b3 (patch) | |
| tree | 8b1cd720a9e38c745359581e74d216a04e39e5ef /src/libcollections/string.rs | |
| parent | 087b9283a0ed8df68f47ab07a25e60bc6a3ca050 (diff) | |
| download | rust-0169218047dc989acf9ea25e3122b9c659acb6b3.tar.gz rust-0169218047dc989acf9ea25e3122b9c659acb6b3.zip | |
Fix fallout from Vec stabilization
Diffstat (limited to 'src/libcollections/string.rs')
| -rw-r--r-- | src/libcollections/string.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index a12d403603f..bb66d271ee4 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -23,6 +23,7 @@ use core::raw::Slice as RawSlice; use {Mutable, MutableSeq}; use hash; +use slice::CloneableVector; use str; use str::{CharRange, StrAllocating, MaybeOwned, Owned}; use str::Slice as MaybeOwnedSlice; // So many `Slice`s... @@ -75,9 +76,7 @@ impl String { /// ``` #[inline] pub fn from_str(string: &str) -> String { - String { - vec: Vec::from_slice(string.as_bytes()) - } + String { vec: string.as_bytes().to_vec() } } /// Deprecated. Replaced by `string::raw::from_parts` |
