mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/power.rs')
| -rw-r--r-- | src/block/power.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block/power.rs b/src/block/power.rs index e04481d..ada60c9 100644 --- a/src/block/power.rs +++ b/src/block/power.rs @@ -116,7 +116,7 @@ impl BlockLogic for ConnectorBlock { } fn mirror_state(&self, state: &mut State, horizontally: bool, vertically: bool) { - for (dx, dy) in Self::get_state_mut(state).iter_mut() { + for (dx, dy) in &mut *Self::get_state_mut(state) { if horizontally { *dx = -*dx; } @@ -127,7 +127,7 @@ impl BlockLogic for ConnectorBlock { } fn rotate_state(&self, state: &mut State, clockwise: bool) { - for (dx, dy) in Self::get_state_mut(state).iter_mut() { + for (dx, dy) in &mut *Self::get_state_mut(state) { let (cdx, cdy) = (*dx, *dy); *dx = if clockwise { cdy } else { -cdy }; *dy = if clockwise { -cdx } else { cdx }; |