Add missing docs about reverts in DoubleEndedQueue

This commit is contained in:
Francisco Giordano
2022-02-16 16:42:33 -03:00
parent aace774961
commit 525a672862

View File

@ -102,6 +102,8 @@ library DoubleEndedQueue {
/**
* @dev Returns the item at the beginning of the queue.
*
* Reverts with `Empty` if the queue is empty.
*/
function front(Bytes32Deque storage deque) internal view returns (bytes32 value) {
if (empty(deque)) revert Empty();
@ -111,6 +113,8 @@ library DoubleEndedQueue {
/**
* @dev Returns the item at the end of the queue.
*
* Reverts with `Empty` if the queue is empty.
*/
function back(Bytes32Deque storage deque) internal view returns (bytes32 value) {
if (empty(deque)) revert Empty();