Leafwing-Studios / Emergence

An organic factory builder about adapting to a changing world.
https://leafwing-studios.github.io/Emergence/
Apache License 2.0
269 stars 36 forks source link

Use system piping to reduce rightward drift in if-let blocks #229

Open alice-i-cecile opened 1 year ago

alice-i-cecile commented 1 year ago

Use the methods implemented in https://github.com/bevyengine/bevy/pull/6751 to a) reduce rightward drift and b) reduce panics across systems.

Look for .unwrap and if let to scan for places where this pattern could be used.

Blocked until we upgrade to Bevy 0.10.

TimJentzsch commented 1 year ago

One if-let-chains are stabilized, that can also help in some places.