Skip to content

Commit 068b26b

Browse files
committed
Fix
1 parent c774932 commit 068b26b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<T, const N: usize> ArrayQueue<T, N> {
3636

3737
/// Returns a mutable reference to the last element of the queue, or `None` if it is empty.
3838
pub fn last_mut(&mut self) -> Option<&mut T> {
39-
self.element_mut(self.length - 1)
39+
self.element_mut(N + self.length - 1)
4040
}
4141

4242
fn element(&self, index: usize) -> Option<&T> {

0 commit comments

Comments
 (0)