about summary refs log tree commit diff
path: root/src/libstd/path
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-17 15:28:14 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-04-18 10:06:24 -0700
commit7d3b0bf3912fabf52fdd6926900e578e55af1b49 (patch)
tree8405cde2a32e6a2499b9262b5dff6dcb34f36d32 /src/libstd/path
parentce2bab68d69ee04e17c0165dbdb7b583d5a7c991 (diff)
downloadrust-7d3b0bf3912fabf52fdd6926900e578e55af1b49.tar.gz
rust-7d3b0bf3912fabf52fdd6926900e578e55af1b49.zip
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<T>. 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]
Diffstat (limited to 'src/libstd/path')
-rw-r--r--src/libstd/path/mod.rs2
-rw-r--r--src/libstd/path/posix.rs2
-rw-r--r--src/libstd/path/windows.rs2
3 files changed, 3 insertions, 3 deletions
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;