amethyst / specs

Specs - Parallel ECS
https://amethyst.github.io/specs/
Apache License 2.0
2.49k stars 219 forks source link

LazyUpdate::exec uses a &mut ref? #761

Open juliusl opened 1 year ago

juliusl commented 1 year ago

Description

LazyUpdate has two exec fn's, exec and exec_mut. However it looks like their function signatures are identical?

https://github.com/amethyst/specs/blob/81073f340425803c99e3292fa14ceb00245bfea5/src/world/lazy.rs#L303-L305

https://github.com/amethyst/specs/blob/81073f340425803c99e3292fa14ceb00245bfea5/src/world/lazy.rs#L337-L339

I was wondering what is the difference between the two?

Imberflur commented 1 year ago

looks like they became the same in https://github.com/amethyst/specs/commit/b4e83ceda356631f480fc488e7c7f716bf82f903

I don't see any reason to have a &World variant here so they can probably be merged into a single method.