diff options
author | Gard Spreemann <gspr@nonempty.org> | 2023-12-12 10:26:36 +0100 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2023-12-12 10:26:36 +0100 |
commit | e54e01d6ecbe912970ba9d967a1ef5f66cfff506 (patch) | |
tree | d8d7d0cd16aa930649d5f1a6c02e56933635e6d0 | |
parent | df9672fd8865cde6fa75968991d52da9ecf715e7 (diff) |
Better naming
-rw-r--r-- | 11/src/stuff.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/11/src/stuff.rs b/11/src/stuff.rs index 82540ef..090f9f4 100644 --- a/11/src/stuff.rs +++ b/11/src/stuff.rs @@ -14,11 +14,11 @@ pub fn is_galaxy(c: u8) -> bool { pub type Position = [usize; 2]; -pub fn cumulative_sum_expansion(doubling: & [bool], factor: usize) -> Vec<usize> { - let mut ret: Vec<usize> = Vec::with_capacity(doubling.len()); +pub fn cumulative_sum_expansion(expansion_mask: & [bool], factor: usize) -> Vec<usize> { + let mut ret: Vec<usize> = Vec::with_capacity(expansion_mask.len()); let mut sum: usize = 0; - for &x in doubling.into_iter() { + for &x in expansion_mask.into_iter() { if x { sum += factor; } |