1
Fork 0

std: Remove copy from all the hashmap key type params

This commit is contained in:
Erick Tryzelaar 2012-06-12 16:17:41 -07:00 committed by Graydon Hoare
parent 01118be818
commit 2cc0a0e19c

View file

@ -262,7 +262,7 @@ mod chained {
ret vec::to_mut(vec::from_elem(nchains, absent));
}
fn mk<K: copy, V: copy>(hasher: hashfn<K>, eqer: eqfn<K>) -> t<K,V> {
fn mk<K, V: copy>(hasher: hashfn<K>, eqer: eqfn<K>) -> t<K,V> {
let initial_capacity: uint = 32u; // 2^5
let slf: t<K, V> = @{mut count: 0u,
mut chains: chains(initial_capacity),
@ -282,7 +282,7 @@ Parameters:
hasher - The hash function for key type K
eqer - The equality function for key type K
*/
fn hashmap<K: const copy, V: copy>(hasher: hashfn<K>, eqer: eqfn<K>)
fn hashmap<K: const, V: copy>(hasher: hashfn<K>, eqer: eqfn<K>)
-> hashmap<K, V> {
chained::mk(hasher, eqer)
}