More visitor cleanups

Provide a non-mutable visitor as well, as the actual rendering loop doesn't need
to change the items fortunately.
This commit is contained in:
Simon Hausmann 2020-05-12 16:33:50 +02:00
parent f22b18584e
commit 5986d5f2b8
2 changed files with 38 additions and 4 deletions

View file

@ -89,7 +89,7 @@ pub fn run_component<GraphicsBackend, GraphicsFactoryFunc>(
let rendering_cache = &mut main_window.rendering_cache;
// Generate cached rendering data once
component.visit_items(
component.visit_items_mut(
move |item, _| {
let item_rendering_info = {
match item.rendering_info() {