Why does HashMap::get and HashMap::entry take different types of key?
Advertisements The signature of HashMap::entry is: pub fn entry(&mut self, key: K) -> Entry<‘_, K, V> Ok, looks good. I want to take an entry from the HashMap whose key is K, so of course I need to give it a K. However, the signature of HashMap:get is: pub fn get<Q>(&self, k: &Q) -> Option<&V>… Read More Why does HashMap::get and HashMap::entry take different types of key?