@@ -119,9 +119,11 @@ fn expand_derive_from_row_struct(
119
119
. and_then( |v| {
120
120
<#ty as :: std:: convert:: TryFrom :: <#try_from>>:: try_from( v)
121
121
. map_err( |e| {
122
+ // Triggers a lint warning if `TryFrom::Err = Infallible`
123
+ #[ allow( unreachable_code) ]
122
124
:: sqlx:: Error :: ColumnDecode {
123
125
index: #id_s. to_string( ) ,
124
- error : sqlx:: __spec_error!( e) ,
126
+ source : sqlx:: __spec_error!( e) ,
125
127
}
126
128
} )
127
129
} )
@@ -142,9 +144,11 @@ fn expand_derive_from_row_struct(
142
144
. and_then( |v| {
143
145
<#ty as :: std:: convert:: TryFrom :: <#try_from>>:: try_from( v)
144
146
. map_err( |e| {
147
+ // Triggers a lint warning if `TryFrom::Err = Infallible`
148
+ #[ allow( unreachable_code) ]
145
149
:: sqlx:: Error :: ColumnDecode {
146
150
index: #id_s. to_string( ) ,
147
- error : sqlx:: __spec_error!( e) ,
151
+ source : sqlx:: __spec_error!( e) ,
148
152
}
149
153
} )
150
154
} )
@@ -161,9 +165,11 @@ fn expand_derive_from_row_struct(
161
165
. and_then( |v| {
162
166
<#ty as :: std:: convert:: TryFrom :: <#try_from>>:: try_from( v. 0 )
163
167
. map_err( |e| {
168
+ // Triggers a lint warning if `TryFrom::Err = Infallible`
169
+ #[ allow( unreachable_code) ]
164
170
:: sqlx:: Error :: ColumnDecode {
165
171
index: #id_s. to_string( ) ,
166
- error : sqlx:: __spec_error!( e) ,
172
+ source : sqlx:: __spec_error!( e) ,
167
173
}
168
174
} )
169
175
} )
0 commit comments