diff --git a/sqlx-postgres/src/types/geometry/path.rs b/sqlx-postgres/src/types/geometry/path.rs index 4f99e7e983..858e8ddcb1 100644 --- a/sqlx-postgres/src/types/geometry/path.rs +++ b/sqlx-postgres/src/types/geometry/path.rs @@ -131,7 +131,7 @@ impl PgPath { .into()); } - if bytes.len() % BYTE_WIDTH * 2 != 0 { + if bytes.len() % (BYTE_WIDTH * 2) != 0 { return Err(format!( "data length not divisible by pairs of {BYTE_WIDTH}: {}", bytes.len() diff --git a/sqlx-postgres/src/types/geometry/polygon.rs b/sqlx-postgres/src/types/geometry/polygon.rs index 5ca97477ea..0932d468f2 100644 --- a/sqlx-postgres/src/types/geometry/polygon.rs +++ b/sqlx-postgres/src/types/geometry/polygon.rs @@ -128,7 +128,7 @@ impl PgPolygon { .into()); } - if bytes.len() % BYTE_WIDTH * 2 != 0 { + if bytes.len() % (BYTE_WIDTH * 2) != 0 { return Err(format!( "data length not divisible by pairs of {BYTE_WIDTH}: {}", bytes.len()