We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
matches!
1 parent a67fe64 commit 98abdf9Copy full SHA for 98abdf9
postgres-types/src/lib.rs
@@ -1022,18 +1022,10 @@ impl<'a> ToSql for &'a str {
1022
}
1023
1024
fn accepts(ty: &Type) -> bool {
1025
- match *ty {
1026
- Type::VARCHAR | Type::TEXT | Type::BPCHAR | Type::NAME | Type::UNKNOWN => true,
1027
- ref ty
1028
- if (ty.name() == "citext"
1029
- || ty.name() == "ltree"
1030
- || ty.name() == "lquery"
1031
- || ty.name() == "ltxtquery") =>
1032
- {
1033
- true
1034
- }
1035
- _ => false,
1036
+ matches!(
+ *ty,
+ Type::VARCHAR | Type::TEXT | Type::BPCHAR | Type::NAME | Type::UNKNOWN
+ ) || matches!(ty.name(), "citext" | "ltree" | "lquery" | "ltxtquery")
1037
1038
1039
to_sql_checked!();
0 commit comments