added more to queue
This commit is contained in:
parent
5300c4f4fc
commit
971fc89254
@ -28,4 +28,8 @@ impl<T> Queue<T> {
|
|||||||
pub fn peek(&self) -> Option<&T> {
|
pub fn peek(&self) -> Option<&T> {
|
||||||
self.queue.first()
|
self.queue.first()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn peek_at(&self, item: T) -> Option<&T> {
|
||||||
|
self.queue.get(item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user