Skip to content

Commit 3f1c37e

Browse files
committed
Small fixes for tests
1 parent 1e997d6 commit 3f1c37e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/libcollections/smallintmap.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use core::mem::replace;
2424
use {Collection, Mutable, Map, MutableMap, MutableSeq};
2525
use {vec, slice};
2626
use vec::Vec;
27-
use hash::Hash;
2827

2928
/// A map optimized for small integer keys.
3029
///
@@ -59,7 +58,7 @@ use hash::Hash;
5958
/// months.clear();
6059
/// assert!(months.is_empty());
6160
/// ```
62-
#[deriving(PartialEq, Eq, Hash)]
61+
#[deriving(Hash, PartialEq, Eq)]
6362
pub struct SmallIntMap<T> {
6463
v: Vec<Option<T>>,
6564
}
@@ -480,8 +479,9 @@ pub type Values<'a, T> =
480479
mod test_map {
481480
use std::prelude::*;
482481
use std::hash;
482+
use vec::Vec;
483483

484-
use {Map, MutableMap, Mutable};
484+
use {Map, MutableMap, Mutable, MutableSeq};
485485
use super::SmallIntMap;
486486

487487
#[test]
@@ -737,9 +737,9 @@ mod test_map {
737737
fn test_clone() {
738738
let mut a = SmallIntMap::new();
739739

740-
a.insert(1, vec!(4i, 5, 6));
741-
a.insert(4, vec!());
742-
a.insert(6, vec!(1, 3));
740+
a.insert(1, 'x');
741+
a.insert(4, 'y');
742+
a.insert(6, 'z');
743743

744744
assert!(a.clone() == a);
745745
}
@@ -781,7 +781,7 @@ mod test_map {
781781

782782
#[test]
783783
fn test_from_iter() {
784-
let xs = vec![(1u, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')];
784+
let xs: Vec<(uint, char)> = vec![(1u, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e')];
785785

786786
let map: SmallIntMap<char> = xs.iter().map(|&x| x).collect();
787787

src/libcollections/trie.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ mod test_map {
13291329
#[test]
13301330
fn test_show() {
13311331
let mut map = TrieMap::new();
1332-
let empty = TrieMap::new();
1332+
let empty: TrieMap<uint> = TrieMap::new();
13331333

13341334
map.insert(1, 'a');
13351335
map.insert(2, 'b');

0 commit comments

Comments
 (0)