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
Hi, it would be nice if a insert_or_get_mut() would exist.
my use case:
The Qp tries store bitmaps. I have a new bitmap A associated with the key 1. I would like the perform a binary and operation if a bitmap B for key 1 is already in the trie otherwise I would like to insert A. So that the value of key 1 is now A & B.
Currently I simple call .insert(A). If I get Some as return value I perform insert(A & B) again. But so I must run twice through the trie.
The text was updated successfully, but these errors were encountered:
Hi, it would be nice if a
insert_or_get_mut()
would exist.my use case:
The Qp tries store bitmaps. I have a new bitmap
A
associated with the key1
. I would like the perform a binary and operation if a bitmapB
for key1
is already in the trie otherwise I would like to insertA
. So that the value of key1
is nowA & B
.Currently I simple call
.insert(A)
. If I getSome
as return value I performinsert(A & B)
again. But so I must run twice through the trie.The text was updated successfully, but these errors were encountered: