summaryrefslogtreecommitdiffstats
path: root/CLI/rust/src/game_of_life/simulation
diff options
context:
space:
mode:
Diffstat (limited to 'CLI/rust/src/game_of_life/simulation')
-rw-r--r--CLI/rust/src/game_of_life/simulation/plane.rs2
-rw-r--r--CLI/rust/src/game_of_life/simulation/universe.rs6
2 files changed, 3 insertions, 5 deletions
diff --git a/CLI/rust/src/game_of_life/simulation/plane.rs b/CLI/rust/src/game_of_life/simulation/plane.rs
index 10acd43..fad9398 100644
--- a/CLI/rust/src/game_of_life/simulation/plane.rs
+++ b/CLI/rust/src/game_of_life/simulation/plane.rs
@@ -1,5 +1,5 @@
-use std::ops::{Index, IndexMut};
use super::circular_index;
+use std::ops::{Index, IndexMut};
/// Game of Life universe building blocks (a plane is a circular Vec)
///
diff --git a/CLI/rust/src/game_of_life/simulation/universe.rs b/CLI/rust/src/game_of_life/simulation/universe.rs
index 5e5a921..a7a464c 100644
--- a/CLI/rust/src/game_of_life/simulation/universe.rs
+++ b/CLI/rust/src/game_of_life/simulation/universe.rs
@@ -1,8 +1,7 @@
+use super::circular_index;
use crate::game_of_life::opts::Opts;
use crate::game_of_life::simulation::plane::Plane;
use std::ops::Index;
-use super::circular_index;
-
/// Game of Life universe struct for running simulations
#[derive(Debug, Clone, PartialEq)]
@@ -12,8 +11,7 @@ pub(crate) struct Universe {
pub future: Vec<Plane>,
}
-impl Index<isize> for Universe
-{
+impl Index<isize> for Universe {
type Output = Plane;
fn index(&self, idx: isize) -> &Plane {
let len = self.current.len() as isize;