From 7d3b0bf3912fabf52fdd6926900e578e55af1b49 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 17 Apr 2014 15:28:14 -0700 Subject: std: Make ~[T] no longer a growable vector This removes all resizability support for ~[T] vectors in preparation of DST. The only growable vector remaining is Vec. In summary, the following methods from ~[T] and various functions were removed. Each method/function has an equivalent on the Vec type in std::vec unless otherwise stated. * slice::OwnedCloneableVector * slice::OwnedEqVector * slice::append * slice::append_one * slice::build (no replacement) * slice::bytes::push_bytes * slice::from_elem * slice::from_fn * slice::with_capacity * ~[T].capacity() * ~[T].clear() * ~[T].dedup() * ~[T].extend() * ~[T].grow() * ~[T].grow_fn() * ~[T].grow_set() * ~[T].insert() * ~[T].pop() * ~[T].push() * ~[T].push_all() * ~[T].push_all_move() * ~[T].remove() * ~[T].reserve() * ~[T].reserve_additional() * ~[T].reserve_exect() * ~[T].retain() * ~[T].set_len() * ~[T].shift() * ~[T].shrink_to_fit() * ~[T].swap_remove() * ~[T].truncate() * ~[T].unshift() * ~str.clear() * ~str.set_len() * ~str.truncate() Note that no other API changes were made. Existing apis that took or returned ~[T] continue to do so. [breaking-change] --- src/libstd/path/mod.rs | 2 +- src/libstd/path/posix.rs | 2 +- src/libstd/path/windows.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index 6a1f9c1a4c7..2960d55f337 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -74,7 +74,7 @@ use option::{Option, None, Some}; use str; use str::{MaybeOwned, Str, StrSlice, from_utf8_lossy}; use strbuf::StrBuf; -use slice::{OwnedCloneableVector, OwnedVector, Vector}; +use slice::Vector; use slice::{ImmutableEqVector, ImmutableVector}; use vec::Vec; diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 1a80e52359d..47f9604d63f 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -21,7 +21,7 @@ use option::{Option, None, Some}; use str; use str::Str; use slice::{CloneableVector, RevSplits, Splits, Vector, VectorVector, - ImmutableEqVector, OwnedVector, ImmutableVector, OwnedCloneableVector}; + ImmutableEqVector, OwnedVector, ImmutableVector}; use vec::Vec; use super::{BytesContainer, GenericPath, GenericPathUnsafe}; diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 435b64e8d2a..58c7aaa2d32 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -21,7 +21,7 @@ use io::Writer; use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Rev, Iterator, Map}; use option::{Option, Some, None}; use slice::{Vector, OwnedVector, ImmutableVector}; -use str::{CharSplits, OwnedStr, Str, StrVector, StrSlice}; +use str::{CharSplits, Str, StrVector, StrSlice}; use strbuf::StrBuf; use vec::Vec; -- cgit 1.4.1-3-g733a5