Skip to content

Commit

Permalink
Rename first_elem
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher committed Oct 21, 2024
1 parent 45aac6c commit 98acf90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions noir_stdlib/src/array/mod.nr
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ impl<T, let N: u32> [T; N] {
/// assert_eq(b, [2, 4, 6]);
/// ```
pub fn map<U, Env>(self, f: fn[Env](T) -> U) -> [U; N] {
let first_elem = crate::mem::zeroed();
let mut ret = [first_elem; N];
let uninitialized = crate::mem::zeroed();
let mut ret = [uninitialized; N];

for i in 0..self.len() {
ret[i] = f(self[i]);
Expand Down

0 comments on commit 98acf90

Please sign in to comment.