Skip to content

Commit

Permalink
Merge pull request #28 from notV4l/fix_test_warnings
Browse files Browse the repository at this point in the history
fix warnings
  • Loading branch information
clexmond authored Mar 26, 2024
2 parents a25bc19 + e3416b8 commit 9402f71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/f128/math/ops.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn neg(a: Fixed) -> Fixed {
// self is a fixed point value
// b is a fixed point value
fn pow(a: Fixed, b: Fixed) -> Fixed {
let (div_u128, rem_u128) = _split_unsigned(b);
let (_div_u128, rem_u128) = _split_unsigned(b);

// use the more performant integer pow when y is an int
if (rem_u128 == 0) {
Expand Down Expand Up @@ -346,7 +346,7 @@ mod tests {
#[should_panic]
fn test_negative_try_into_u128() {
let a = FixedTrait::new_unscaled(1, true);
let a: u128 = a.try_into().unwrap();
let _a: u128 = a.try_into().unwrap();
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions src/f128/types/fixed.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ mod tests {
#[should_panic]
fn test_try_into_fail() {
let mut a = FixedTrait::new_unscaled(42, true);
let b: u128 = a.try_into().unwrap();
let _b: u128 = a.try_into().unwrap();
}

#[test]
Expand All @@ -1053,7 +1053,7 @@ mod tests {
#[should_panic]
fn test_try_into_f64_fail() {
let a = FixedTrait::new_unscaled(ONE_u64.into(), true);
let b: Fixed64 = a.try_into().unwrap();
let _b: Fixed64 = a.try_into().unwrap();
}

#[available_gas(10000000)]
Expand Down
4 changes: 2 additions & 2 deletions src/f64/math/ops.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ fn neg(a: Fixed) -> Fixed {
// self is a Fixed point value
// b is a Fixed point value
fn pow(a: Fixed, b: Fixed) -> Fixed {
let (div, rem) = core::integer::u64_safe_divmod(b.mag, u64_as_non_zero(ONE));
let (_div, rem) = core::integer::u64_safe_divmod(b.mag, u64_as_non_zero(ONE));

// use the more performant integer pow when y is an int
if (rem == 0) {
Expand Down Expand Up @@ -317,7 +317,7 @@ mod tests {
#[should_panic]
fn test_negative_try_into_u128() {
let a = FixedTrait::new_unscaled(1, true);
let a: u128 = a.try_into().unwrap();
let _a: u128 = a.try_into().unwrap();
}

#[test]
Expand Down

0 comments on commit 9402f71

Please sign in to comment.