We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c774932 commit 068b26bCopy full SHA for 068b26b
src/array_queue.rs
@@ -36,7 +36,7 @@ impl<T, const N: usize> ArrayQueue<T, N> {
36
37
/// Returns a mutable reference to the last element of the queue, or `None` if it is empty.
38
pub fn last_mut(&mut self) -> Option<&mut T> {
39
- self.element_mut(self.length - 1)
+ self.element_mut(N + self.length - 1)
40
}
41
42
fn element(&self, index: usize) -> Option<&T> {
0 commit comments