Skip to content

Commit

Permalink
Merge 0406606 into 19f5757
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher authored Sep 11, 2024
2 parents 19f5757 + 0406606 commit 89b90cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs/noir/concepts/generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl<T, U, let N: u32, let M: u32> Serialize<N + M> for (T, U)

fn main() {
let data = (1, [2, 3, 4]);
assert(data.serialize().len(), 4);
assert_eq(data.serialize().len(), 4);
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn seems_fine<let N: u32>(array: [Field; N]) -> [Field; N] {

fn pop<let N: u32>(array: [Field; N]) -> [Field; N - 1] {
let mut result: [Field; N - 1] = std::mem::zeroed();
for i in 0..N {
for i in 0..N - 1 {
result[i] = array[i];
}
result
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// docs:start:underflow-example
fn pop<let N: u32>(array: [Field; N]) -> [Field; N - 1] {
let mut result: [Field; N - 1] = std::mem::zeroed();
for i in 0..N {
for i in 0..N - 1 {
result[i] = array[i];
}
result
Expand Down

0 comments on commit 89b90cc

Please sign in to comment.