mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat: change async-bb8 fork and tokio spawn for concurrent database calls (#2774)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: akshay-97 <adiosphobian@gmail.com> Co-authored-by: akshay.s <akshay.s@juspay.in> Co-authored-by: Kartikeya Hegde <karthikey.hegde@juspay.in>
This commit is contained in:
@ -77,7 +77,9 @@ impl<const PRECISION: u8> Percentage<PRECISION> {
|
||||
if value.contains('.') {
|
||||
// if string has '.' then take the decimal part and verify precision length
|
||||
match value.split('.').last() {
|
||||
Some(decimal_part) => decimal_part.trim_end_matches('0').len() <= PRECISION.into(),
|
||||
Some(decimal_part) => {
|
||||
decimal_part.trim_end_matches('0').len() <= <u8 as Into<usize>>::into(PRECISION)
|
||||
}
|
||||
// will never be None
|
||||
None => false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user