From 5ecc7537178f6eb5e14ed2abf4a512185967e36a Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Tue, 26 Jan 2021 10:36:55 +0100 Subject: [PATCH] keys and items shouldn't take a mutable reference to self. --- src/storage.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage.rs b/src/storage.rs index b8bf4f8..7b38b2c 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -35,7 +35,7 @@ impl Storage { &mut self.items[id] } - pub fn items(&mut self) -> impl Iterator { + pub fn items(&self) -> impl Iterator { self.items.iter() } @@ -43,7 +43,7 @@ impl Storage { self.items.iter_mut() } - pub fn keys(&mut self) -> impl Iterator { + pub fn keys(&self) -> impl Iterator { self.keys.keys() } }