AK: Verify that HashMap is not empty in take_first
This makes the behavior uniform with: - HashTable - SinglyLinkedList - Vector
This commit is contained in:
parent
e08f6a69b2
commit
97d99aa8d6
1 changed files with 1 additions and 0 deletions
|
|
@ -246,6 +246,7 @@ public:
|
|||
V take_first()
|
||||
requires(IsOrdered)
|
||||
{
|
||||
VERIFY(!is_empty());
|
||||
return take(begin()->key).release_value();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue