diff --git a/src/punctuated.rs b/src/punctuated.rs index ab2e7d9879..b26ed647f1 100644 --- a/src/punctuated.rs +++ b/src/punctuated.rs @@ -93,7 +93,7 @@ impl Punctuated { } /// Borrows the element at the given index. - pub fn get(&mut self, index: usize) -> Option<&T> { + pub fn get(&self, index: usize) -> Option<&T> { if let Some((value, _punct)) = self.inner.get(index) { Some(value) } else if index == self.inner.len() {