rust-embedded / heapless

Heapless, `static` friendly data structures
Apache License 2.0
1.56k stars 185 forks source link

LinearMap entry API #471

Open Ten0 opened 6 months ago

Ten0 commented 6 months ago

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:

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.