From dd7e269f577dc33bcf92bec2583f7e53609081fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Fri, 12 Jul 2024 09:36:19 +0200 Subject: [PATCH] Remove mut from Puntuated::get() --- src/punctuated.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/punctuated.rs b/src/punctuated.rs index ab2e7d987..b26ed647f 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() {