Currently to insert in the LinearMap and get a mutable reference to the corresponding value (map.entry(key).or_insert_with(...)), it's necessary to .insert() then .get().unwrap(), because there is no entry API or assimilated.
This implies:
Cloning the key, in order to be able to call get()
Iterating on the map twice: once to realize the entry is not there, and once to get the inserted entry
There was already an issue for entry APIs for maps: #103, but that was closed after only implementing it for only one of the map types: #289 - I would tend to believe that this was not intentional.
Currently to insert in the
LinearMap
and get a mutable reference to the corresponding value (map.entry(key).or_insert_with(...)
), it's necessary to.insert()
then.get().unwrap()
, because there is no entry API or assimilated.This implies:
get()
There was already an issue for entry APIs for maps: #103, but that was closed after only implementing it for only one of the map types: #289 - I would tend to believe that this was not intentional.