Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit113d410

Browse files
authored
fix fromsql for domains
1 parent6ae17e0 commit113d410

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎postgres-derive/src/fromsql.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ fn domain_accepts_body(name: &str, field: &syn::Field) -> TokenStream {
179179
fndomain_body(ident:&Ident,field:&syn::Field) ->TokenStream{
180180
let ty =&field.ty;
181181
quote!{
182-
<#tyas postgres_types::FromSql>::from_sql(_type, buf).map(#ident)
182+
<#tyas postgres_types::FromSql>::from_sql(match*_type.kind(){
183+
postgres_types::Kind::Domain(ref _type) => _type,
184+
_ => _type
185+
}, buf).map(#ident)
183186
}
184187
}
185188

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp