Lines Matching refs:k2
72 pub fn insert(&mut self, k1: K1, k2: K2, v: V) -> Option<V> { in insert()
73 let oldval = if let Some(oldkey) = self.alt.insert(k2.clone(), k1.clone()) { in insert()
79 .insert(k1, (k2.clone(), v)) in insert()
82 if oldk2 != k2 { in insert()
99 self.main.remove(key).map(|(k2, v)| { in remove()
100 self.alt.remove(&k2); in remove()
121 let k2 = 0x1a04_ce4b_8329_14fe; in get() localVariable
123 assert!(m.insert(k1, k2, val).is_none()); in get()
126 assert_eq!(*m.get_alt(&k2).expect("failed to look up alt key"), val); in get()
134 let k2 = 0x1a04_ce4b_8329_14fe; in update_main_key() localVariable
136 assert!(m.insert(k1, k2, val).is_none()); in update_main_key()
141 m.insert(new_k1, k2, val2) in update_main_key()
148 assert_eq!(*m.get_alt(&k2).expect("failed to look up alt key"), val2); in update_main_key()
156 let k2 = 0x1a04_ce4b_8329_14fe; in update_alt_key() localVariable
158 assert!(m.insert(k1, k2, val).is_none()); in update_alt_key()
168 assert!(m.get_alt(&k2).is_none()); in update_alt_key()
181 let k2 = 0x1a04_ce4b_8329_14fe; in update_value() localVariable
183 assert!(m.insert(k1, k2, val).is_none()); in update_value()
187 m.insert(k1, k2, val2).expect("failed to update alt key"), in update_value()
192 assert_eq!(*m.get_alt(&k2).expect("failed to look up alt key"), val2); in update_value()
200 let k2 = 0x1a04_ce4b_8329_14fe; in update_both_keys_main() localVariable
202 assert!(m.insert(k1, k2, val).is_none()); in update_both_keys_main()
218 assert!(m.get_alt(&k2).is_none()); in update_both_keys_main()
232 let k2 = 0x1a04_ce4b_8329_14fe; in update_both_keys_alt() localVariable
234 assert!(m.insert(k1, k2, val).is_none()); in update_both_keys_alt()
243 m.insert(new_k1, k2, val3) in update_both_keys_alt()
253 assert_eq!(*m.get_alt(&k2).expect("failed to look up alt key"), val3); in update_both_keys_alt()
261 let k2 = 0x1a04_ce4b_8329_14fe; in remove() localVariable
263 assert!(m.insert(k1, k2, val).is_none()); in remove()
267 assert!(m.get_alt(&k2).is_none()); in remove()