Improve ECS

Use query_one_mut instead of query_mut for single objects
This commit is contained in:
reo 2025-06-30 23:29:41 +03:00
parent b793bec63a
commit cdbac0d4ab
3 changed files with 12 additions and 21 deletions

View file

@ -72,7 +72,6 @@ impl Renderer for GliumRenderer {
let mut frame = self.display.draw();
frame.clear_color_and_depth((0.1, 0.1, 0.15, 1.0), 1.0);
// Expect exactly one active camera in the world.
let cam = match world.query::<&Camera>().iter().next() {
Some((_, cam)) => *cam,
None => {