mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
fix(postgres): fix missing inversion on PgNumeric::is_valid_digit()
This commit is contained in:
parent
394a7e86a7
commit
b5c218eb23
1 changed files with 2 additions and 2 deletions
|
@ -151,8 +151,8 @@ impl PgNumeric {
|
||||||
buf.extend(&scale.to_be_bytes());
|
buf.extend(&scale.to_be_bytes());
|
||||||
|
|
||||||
for (i, &digit) in digits.iter().enumerate() {
|
for (i, &digit) in digits.iter().enumerate() {
|
||||||
if Self::is_valid_digit(digit) {
|
if !Self::is_valid_digit(digit) {
|
||||||
return Err(format!("{i}th PgNumeric digit out of range {digit}"));
|
return Err(format!("{i}th PgNumeric digit out of range: {digit}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
buf.extend(&digit.to_be_bytes());
|
buf.extend(&digit.to_be_bytes());
|
||||||
|
|
Loading…
Reference in a new issue