From 971fc89254a4d46ab4aec39f7d291a90900c6393 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sun, 22 Nov 2020 23:20:45 -0500 Subject: [PATCH] added more to queue --- src/queue.rs | 4 ++++ 1 file changed, 4 insertions(+) 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) + } }