AK: Verify that HashMap is not empty in take_first

This makes the behavior uniform with:
- HashTable
- SinglyLinkedList
- Vector
This commit is contained in:
Pavel Shliak 2024-12-08 20:50:31 +04:00 committed by Jelle Raaijmakers
parent e08f6a69b2
commit 97d99aa8d6
Notes: github-actions[bot] 2024-12-09 11:32:11 +00:00

View file

@ -246,6 +246,7 @@ public:
V take_first()
requires(IsOrdered)
{
VERIFY(!is_empty());
return take(begin()->key).release_value();
}