Repository: iqlusioninc/abscissa (language: rust)

Issue:
Cannot use Registry::iter() without mutable reference.
https://github.com/iqlusioninc/abscissa/blob/6930a0097ee0a7e79cd786a8eece6d81432e5a68/core/src/component/registry.rs#L76

Is the `&mut self` a bug (should be just `&self` to allow non-mutable usage)?


Discussion / hints:
Yes, definitely a bug.

Fix patch:
diff --git a/core/src/component/registry.rs b/core/src/component/registry.rs
index 9791ff95..67eb4137 100644
--- a/core/src/component/registry.rs
+++ b/core/src/component/registry.rs
@@ -72,8 +72,8 @@ where
         Ok(())
     }
 
-    /// Iterate over the components mutably.
-    pub fn iter(&mut self) -> slice::Iter<Box<dyn Component<A>>> {
+    /// Iterate over the components.
+    pub fn iter(&self) -> slice::Iter<Box<dyn Component<A>>> {
         self.components.iter()
     }
 


Test patch: