The code in the docs isn't being run because it's failing on nargo nightly, e.g.
fn main() {
let field = 2;
let bytes = field.to_le_bytes(4);
}
warning: unused variable bytes
┌─ src/main.nr:3:9
│
3 │ let bytes = field.to_le_bytes(4);
│ ----- unused variable
│
error: Function expects 1 parameter but 2 were given
┌─ src/main.nr:3:17
│
3 │ let bytes = field.to_le_bytes(4);
│ --------------------
│
Aborting due to 1 previous error
To Reproduce
1.
2.
3.
4.
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
nargo version = 0.33.0 noirc version = 0.33.0+e84f7d2e81c1f59e9af015f38c2d477607a9c558 (git version hash: e84f7d2e81c1f59e9af015f38c2d477607a9c558, is dirty: false)
Aim
Attempted to learn how
to_le_bytes
andto_be_bytes
worked from theirnoir-lang.org/docs
pageExpected Behavior
Expected to find how those methods worked, including each parameter, along with working example code
Bug
nargo
nightly, e.g.To Reproduce
1. 2. 3. 4.
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
nargo version = 0.33.0 noirc version = 0.33.0+e84f7d2e81c1f59e9af015f38c2d477607a9c558 (git version hash: e84f7d2e81c1f59e9af015f38c2d477607a9c558, is dirty: false)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response