diff --git a/docs/docs/getting_started/quick_start.md b/docs/docs/getting_started/quick_start.md index c980b5e7ffc..7b4524f6b8e 100644 --- a/docs/docs/getting_started/quick_start.md +++ b/docs/docs/getting_started/quick_start.md @@ -68,6 +68,7 @@ We can now use `nargo` to generate a _Prover.toml_ file, where our input values ```sh cd hello_world nargo check +``` Let's feed some valid values into this file: @@ -113,7 +114,7 @@ bb verify -k ./target/vk -p ./target/proof Notice that in order to verify a proof, the verifier knows nothing but the circuit, which is compiled and used to generate the verification key. This is obviously quite important: private inputs remain private. -As for the public inputs, you may have noticed they haven't been specified. This behavior varies with each particular backend, but barretenberg typically attaches them to the proof. You can see them by parsing and splitting it. For example for if your public inputs are 32 bytes: +As for the public inputs, you may have noticed they haven't been specified. This behavior varies with each particular backend, but barretenberg typically attaches them to the proof. You can see them by parsing and splitting it. For example if your public inputs are 32 bytes: ```bash head -c 32 ./target/proof | od -An -v -t x1 | tr -d $' \n' diff --git a/docs/docs/noir/concepts/data_types/slices.mdx b/docs/docs/noir/concepts/data_types/slices.mdx index cfee564a302..e8091c62dd8 100644 --- a/docs/docs/noir/concepts/data_types/slices.mdx +++ b/docs/docs/noir/concepts/data_types/slices.mdx @@ -57,7 +57,7 @@ View the corresponding test file [here][test-file]. ### push_front -Returns a new array with the specified element inserted at index 0. The existing elements indexes are incremented by 1. +Returns a new slice with the specified element inserted at index 0. The existing elements indexes are incremented by 1. ```rust fn push_front(_self: Self, _elem: T) -> Self @@ -75,7 +75,7 @@ View the corresponding test file [here][test-file]. ### pop_front -Returns a tuple of two items, the first element of the array and the rest of the array. +Returns a tuple of two items, the first element of the slice and the rest of the slice. ```rust fn pop_front(_self: Self) -> (T, Self) @@ -91,7 +91,7 @@ View the corresponding test file [here][test-file]. ### pop_back -Returns a tuple of two items, the beginning of the array with the last element omitted and the last element. +Returns a tuple of two items, the beginning of the slice with the last element omitted and the last element. ```rust fn pop_back(_self: Self) -> (Self, T) diff --git a/docs/docs/noir/concepts/generics.md b/docs/docs/noir/concepts/generics.md index 8925666aa20..bece5896a60 100644 --- a/docs/docs/noir/concepts/generics.md +++ b/docs/docs/noir/concepts/generics.md @@ -36,6 +36,7 @@ impl BigInt { fn first(first: BigInt, second: BigInt) -> Self { assert(first.limbs != second.limbs); first + } fn second(first: BigInt, second: Self) -> Self { assert(first.limbs != second.limbs); @@ -96,7 +97,17 @@ fn main() { // We can use first_element_is_equal for arrays of any type // as long as we have an Eq impl for the types we pass in let array = [MyStruct::new(), MyStruct::new()]; - assert(array_eq(array, array, MyStruct::eq)); + assert(first_element_is_equal(array, array)); +} + +struct MyStruct { + foo: Field +} + +impl MyStruct { + fn new() -> Self { + MyStruct { foo: 0 } + } } impl Eq for MyStruct { @@ -152,9 +163,9 @@ fn example() { // there is no matching impl for `u32: MyTrait`. // // Substituting the `10` on the left hand side of this assert - // with `10 as u32` would also fail with a type mismatch as we + // with `10 as u32` would fail with a type mismatch as we // are expecting a `Field` from the right hand side. - assert(10 as u32 == foo.generic_method::()); + assert(10 == foo.generic_method::()); } ```