From 04066067754a0ced7b991d9c007db8f7442bbf61 Mon Sep 17 00:00:00 2001 From: Jake Fecher Date: Wed, 11 Sep 2024 08:24:24 -0500 Subject: [PATCH] Fix docs typos --- docs/docs/noir/concepts/generics.md | 2 +- .../arithmetic_generics_intermediate_underflow/src/main.nr | 2 +- .../compile_failure/arithmetic_generics_underflow/src/main.nr | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/noir/concepts/generics.md b/docs/docs/noir/concepts/generics.md index f05540f9f55..6dbde4ed53b 100644 --- a/docs/docs/noir/concepts/generics.md +++ b/docs/docs/noir/concepts/generics.md @@ -197,7 +197,7 @@ impl Serialize for (T, U) fn main() { let data = (1, [2, 3, 4]); - assert(data.serialize().len(), 4); + assert_eq(data.serialize().len(), 4); } ``` diff --git a/test_programs/compile_failure/arithmetic_generics_intermediate_underflow/src/main.nr b/test_programs/compile_failure/arithmetic_generics_intermediate_underflow/src/main.nr index 58cf2f648e5..df778468397 100644 --- a/test_programs/compile_failure/arithmetic_generics_intermediate_underflow/src/main.nr +++ b/test_programs/compile_failure/arithmetic_generics_intermediate_underflow/src/main.nr @@ -15,7 +15,7 @@ fn seems_fine(array: [Field; N]) -> [Field; N] { fn pop(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 diff --git a/test_programs/compile_failure/arithmetic_generics_underflow/src/main.nr b/test_programs/compile_failure/arithmetic_generics_underflow/src/main.nr index 4df83ac56e0..bc670a75a76 100644 --- a/test_programs/compile_failure/arithmetic_generics_underflow/src/main.nr +++ b/test_programs/compile_failure/arithmetic_generics_underflow/src/main.nr @@ -1,7 +1,7 @@ // docs:start:underflow-example fn pop(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