Skip to content

Commit

Permalink
fix: update overflowing_sub from deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
zmalatrax committed Aug 7, 2024
1 parent 00f3668 commit d2516fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cairo_programs/cairo/hints/u32_overflowing_sub_err.cairo
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fn main() -> Result<u32, u32> {
integer::u32_overflowing_sub(10_u32, 12_u32)
use core::num::traits::OverflowingSub;

fn main() -> (u32, bool) {
10_u32.overflowing_sub(12)
}
6 changes: 4 additions & 2 deletions cairo_programs/cairo/hints/u32_overflowing_sub_valid.cairo
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fn main() -> Result<u32, u32> {
integer::u32_overflowing_sub(12_u32, 10_u32)
use core::num::traits::OverflowingSub;

fn main() -> (u32, bool) {
12_u32.overflowing_sub(10)
}

0 comments on commit d2516fe

Please sign in to comment.