From 37bea2a7d07b8a42d9502b7318cf9317ad3680b1 Mon Sep 17 00:00:00 2001 From: Samuel Chase Date: Sat, 11 May 2013 20:35:44 +0530 Subject: [PATCH] Fix errors in test_hashset(). All tests now pass. --- src/libcore/to_str.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libcore/to_str.rs b/src/libcore/to_str.rs index 3c75cbaec15cd..08e72e8fe8624 100644 --- a/src/libcore/to_str.rs +++ b/src/libcore/to_str.rs @@ -178,6 +178,7 @@ impl ToStr for @[A] { #[allow(non_implicitly_copyable_typarams)] mod tests { use hashmap::HashMap; + use hashmap::HashSet; #[test] fn test_simple_types() { assert!(1i.to_str() == ~"1"); @@ -224,8 +225,8 @@ mod tests { #[test] fn test_hashset() { - let mut set: HashSet = HashSet::new(); - let empty_set: HashSet = HashSet::new(); + let mut set: HashSet = HashSet::new(); + let empty_set: HashSet = HashSet::new(); set.insert(1); set.insert(2); @@ -233,6 +234,6 @@ mod tests { let set_str = set.to_str(); assert!(set_str == ~"{1, 2}" || set_str == ~"{2, 1}"); - assert!(empty.to_str() == ~"{}"); + assert!(empty_set.to_str() == ~"{}"); } } \ No newline at end of file