Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key */
(&self, key: i32)
| 23 | |
| 24 | /** Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key */ |
| 25 | fn get(&self, key: i32) -> i32 { |
| 26 | if self.map.get(&key).is_some() { |
| 27 | *self.map.get(&key).unwrap() |
| 28 | } else { |
| 29 | -1 |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /** Removes the mapping of the specified value key if this map contains a mapping for the key */ |
| 34 | fn remove(&mut self, key: i32) { |
no outgoing calls