keys and items shouldn't take a mutable reference to self.
This commit is contained in:
@@ -35,7 +35,7 @@ impl Storage {
|
||||
&mut self.items[id]
|
||||
}
|
||||
|
||||
pub fn items(&mut self) -> impl Iterator<Item = &Item> {
|
||||
pub fn items(&self) -> impl Iterator<Item = &Item> {
|
||||
self.items.iter()
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ impl Storage {
|
||||
self.items.iter_mut()
|
||||
}
|
||||
|
||||
pub fn keys(&mut self) -> impl Iterator<Item = &String> {
|
||||
pub fn keys(&self) -> impl Iterator<Item = &String> {
|
||||
self.keys.keys()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user