diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-02-19 19:29:58 -0800 | 
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-02-23 00:35:11 -0800 | 
| commit | 2a14e084cfd8cf9a9149d0b7c6329b0dad0521d0 (patch) | |
| tree | 78090dacffcdda10a36a6e538f3f73d3d3a6e35c /src/libstd/vec.rs | |
| parent | edf351e9f7d17777b1385093bfa7b6654e662d44 (diff) | |
| download | rust-2a14e084cfd8cf9a9149d0b7c6329b0dad0521d0.tar.gz rust-2a14e084cfd8cf9a9149d0b7c6329b0dad0521d0.zip | |
Move std::{trie, hashmap} to libcollections
These two containers are indeed collections, so their place is in libcollections, not in libstd. There will always be a hash map as part of the standard distribution of Rust, but by moving it out of the standard library it makes libstd that much more portable to more platforms and environments. This conveniently also removes the stuttering of 'std::hashmap::HashMap', although 'collections::HashMap' is only one character shorter.
Diffstat (limited to 'src/libstd/vec.rs')
| -rw-r--r-- | src/libstd/vec.rs | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 0adc6083f6b..b4764f577cb 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -3395,7 +3395,6 @@ mod tests { #[test] fn test_permutations() { - use hashmap; { let v: [int, ..0] = []; let mut it = v.permutations(); @@ -3418,13 +3417,13 @@ mod tests { assert_eq!(it.next(), None); } { - // check that we have N! unique permutations - let mut set = hashmap::HashSet::new(); + // check that we have N! permutations let v = ['A', 'B', 'C', 'D', 'E', 'F']; - for perm in v.permutations() { - set.insert(perm); + let mut amt = 0; + for _perm in v.permutations() { + amt += 1; } - assert_eq!(set.len(), 2 * 3 * 4 * 5 * 6); + assert_eq!(amt, 2 * 3 * 4 * 5 * 6); } } | 
