Skip to content

Commit

Permalink
chore: Fix Incorrect wrapping_add Usage in Integers Tutorial (#4295)
Browse files Browse the repository at this point in the history
This pull request addresses an issue identified in the [integers
tutorial](https://noir-lang.org/docs/noir/syntax/data_types/integers/),
where the `wrapping_add` function was incorrectly called with a single
argument `(x + y)` instead of the correct form with two separate
arguments `(x, y)`.

### Changes Made
The documentation has been updated to reflect the correct usage:
```diff
- std::wrapping_add(x + y)
+ std::wrapping_add(x, y)
```

### Acknowledgements
Special thanks to @Complexlity for identifying this issue and bringing
it to attention through issue #4272.
  • Loading branch information
joaolago1113 authored Feb 7, 2024
1 parent 2ffef26 commit ed697bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/noir/concepts/data_types/integers.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,6 @@ Example of how it is used:
use dep::std;

fn main(x: u8, y: u8) -> pub u8 {
std::wrapping_add(x + y)
std::wrapping_add(x, y)
}
```

0 comments on commit ed697bb

Please sign in to comment.