Skip to content

Commit

Permalink
Comment out similar case
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-cichocki committed Sep 20, 2023
1 parent 76957eb commit 02a59fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions decimal_core/src/factories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ pub fn generate_factories(characteristics: DecimalCharacteristics) -> proc_macro
val.try_into().map_err(|_| "checked_from_scale_to_value: can't convert val to base")?)
.map_err(|_| "checked_from_scale_to_value: can't convert val to big_type"
)?;
// no possibility of overflow because of scale limit
let multiplier: u128 = 10u128.checked_pow((#scale - scale) as u32).ok_or_else(|| "checked_from_scale_to_value: multiplier overflow")?;

base.checked_mul(multiplier.try_into().map_err(|_| "checked_from_scale_to_value: can't convert multiplier to big_type")?)
Expand Down

0 comments on commit 02a59fe

Please sign in to comment.