Improve tests
This commit is contained in:
parent
c94c5e9048
commit
5c760f0555
@ -69,7 +69,14 @@ fn insert_other_if_absent<K: Eq + Hash, V>(m: &mut HashMap<K, V>, k: K, o: K, v:
|
||||
}
|
||||
|
||||
// should not trigger, because the one uses different HashMap from another one
|
||||
fn insert_other<K: Eq + Hash, V>(m: &mut HashMap<K, V>, n: &mut HashMap<K, V>, k: K, v: V) {
|
||||
fn insert_from_different_map<K: Eq + Hash, V>(m: HashMap<K, V>, n: &mut HashMap<K, V>, k: K, v: V) {
|
||||
if !m.contains_key(&k) {
|
||||
n.insert(k, v);
|
||||
}
|
||||
}
|
||||
|
||||
// should not trigger, because the one uses different HashMap from another one
|
||||
fn insert_from_different_map2<K: Eq + Hash, V>(m: &mut HashMap<K, V>, n: &mut HashMap<K, V>, k: K, v: V) {
|
||||
if !m.contains_key(&k) {
|
||||
n.insert(k, v);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user