diff options
| author | a14m <[email protected]> | 2021-04-07 14:29:43 +0200 |
|---|---|---|
| committer | a14m <[email protected]> | 2021-04-07 14:29:43 +0200 |
| commit | 7baa09a0147bf79995f996d9afe98e146b7af1a7 (patch) | |
| tree | 856efb35fd5d735dc9411ebe16f2e6c66218a2d7 /CLI/rust/src/game_of_life/simulation | |
| parent | aa0c96b05c7012ac84a3787dcb2b661c7bf53029 (diff) | |
Fix linting issues
Diffstat (limited to 'CLI/rust/src/game_of_life/simulation')
| -rw-r--r-- | CLI/rust/src/game_of_life/simulation/plane.rs | 2 | ||||
| -rw-r--r-- | CLI/rust/src/game_of_life/simulation/universe.rs | 6 |
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; |
