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:
Arun Raj M
2023-11-16 10:27:34 +05:30
committed by GitHub
parent 496245d990
commit d634fdeac3
69 changed files with 1516 additions and 721 deletions

View File

@ -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,
}