diff --git a/src/queue.rs b/src/queue.rs index a95d8c3..85c3327 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -28,4 +28,8 @@ impl Queue { pub fn peek(&self) -> Option<&T> { self.queue.first() } + + pub fn peek_at(&self, item: T) -> Option<&T> { + self.queue.get(item) + } }