std: Remove copy from all the hashmap key type params
This commit is contained in:
parent
01118be818
commit
2cc0a0e19c
1 changed files with 2 additions and 2 deletions
|
@ -262,7 +262,7 @@ mod chained {
|
||||||
ret vec::to_mut(vec::from_elem(nchains, absent));
|
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 initial_capacity: uint = 32u; // 2^5
|
||||||
let slf: t<K, V> = @{mut count: 0u,
|
let slf: t<K, V> = @{mut count: 0u,
|
||||||
mut chains: chains(initial_capacity),
|
mut chains: chains(initial_capacity),
|
||||||
|
@ -282,7 +282,7 @@ Parameters:
|
||||||
hasher - The hash function for key type K
|
hasher - The hash function for key type K
|
||||||
eqer - The equality 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> {
|
-> hashmap<K, V> {
|
||||||
chained::mk(hasher, eqer)
|
chained::mk(hasher, eqer)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue