Closed AngelicosPhosphoros closed 4 years ago
Clone
remove_item
remove
remove_entry
push
set_priority
Result<TPriority, SetPriorityNotFoundError>
Find -> Read -> Update
iter
#[forbid(unsafe_code)]
API
Clone
is no more required for keys (Since it stored only once)remove_item
toremove
remove_entry
which returns both key and prioritypush
operation returns old priority now if same key already existsset_priority
returnsResult<TPriority, SetPriorityNotFoundError>
with old priority instead of panicing on missing keysFind -> Read -> Update
with just one hashmap lookup.iter
) over which will iterate over whole queue in O(n)#[forbid(unsafe_code)]
Implementation