Skip to content

Commit 139a664

Browse files
authored
chore: tweak postgres.rs (#1018)
1 parent d624bec commit 139a664

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

crates/primitives/src/postgres.rs

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Support for the [`postgres_types`] crate.
22
//!
3-
//! **WARNING**: this module depends entirely on [`postgres_types`, which is not yet stable,
3+
//! **WARNING**: this module depends entirely on [`postgres_types`], which is not yet stable,
44
//! therefore this module is exempt from the semver guarantees of this crate.
55
66
use super::{FixedBytes, Sign, Signed};
@@ -188,22 +188,26 @@ impl<const BITS: usize, const LIMBS: usize> ToSql for Signed<BITS, LIMBS> {
188188
}
189189

190190
fn accepts(ty: &Type) -> bool {
191-
matches!(*ty, |Type::BOOL| Type::CHAR
192-
| Type::INT2
193-
| Type::INT4
194-
| Type::INT8
195-
| Type::OID
196-
| Type::FLOAT4
197-
| Type::FLOAT8
198-
| Type::MONEY
199-
| Type::NUMERIC
200-
| Type::BYTEA
201-
| Type::TEXT
202-
| Type::VARCHAR
203-
| Type::JSON
204-
| Type::JSONB
205-
| Type::BIT
206-
| Type::VARBIT)
191+
matches!(
192+
*ty,
193+
Type::BOOL
194+
| Type::CHAR
195+
| Type::INT2
196+
| Type::INT4
197+
| Type::INT8
198+
| Type::OID
199+
| Type::FLOAT4
200+
| Type::FLOAT8
201+
| Type::MONEY
202+
| Type::NUMERIC
203+
| Type::BYTEA
204+
| Type::TEXT
205+
| Type::VARCHAR
206+
| Type::JSON
207+
| Type::JSONB
208+
| Type::BIT
209+
| Type::VARBIT
210+
)
207211
}
208212

209213
to_sql_checked!();

0 commit comments

Comments
 (0)