diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2014-03-22 16:30:45 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2014-03-23 01:59:11 -0400 |
| commit | 3829ac2a52f12b08501cb25d82de32f39fbe801e (patch) | |
| tree | e9d59ed4a26c120d9aa26510a2b4e85516a3dc52 /src/libtest | |
| parent | 94e4e917243425f15241e3dcc9b1bcd4b11ebf3e (diff) | |
| download | rust-3829ac2a52f12b08501cb25d82de32f39fbe801e.tar.gz rust-3829ac2a52f12b08501cb25d82de32f39fbe801e.zip | |
use TotalEq for HashMap
Closes #5283
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/stats.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index 8a3881e801a..222aff37465 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -424,7 +424,7 @@ pub fn write_boxplot(w: &mut io::Writer, s: &Summary, /// Returns a HashMap with the number of occurrences of every element in the /// sequence that the iterator exposes. -pub fn freq_count<T: Iterator<U>, U: Eq+Hash>(mut iter: T) -> hashmap::HashMap<U, uint> { +pub fn freq_count<T: Iterator<U>, U: TotalEq+Hash>(mut iter: T) -> hashmap::HashMap<U, uint> { let mut map: hashmap::HashMap<U,uint> = hashmap::HashMap::new(); for elem in iter { map.insert_or_update_with(elem, 1, |_, count| *count += 1); |
