You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would improve UX if we had a try_insert() or insert_if_empty() method which checks if a value has been set for a key and if it has not then it inserts it.
This removes the need for higher level code to manually check if there is an entry and then insert it via another line of code if it has not been set (removing the need for an if expression at a high level)
The text was updated successfully, but these errors were encountered:
Rust has the following map.entry("").or_insert();
It would improve UX if we had a
try_insert()
orinsert_if_empty()
method which checks if a value has been set for a key and if it has not then it inserts it.This removes the need for higher level code to manually check if there is an entry and then insert it via another line of code if it has not been set (removing the need for an
if
expression at a high level)The text was updated successfully, but these errors were encountered: