File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,14 @@ impl<Tbl: Table> fmt::Display for TryInsertError<Tbl> {
217
217
}
218
218
}
219
219
220
- impl < Tbl : Table > std:: error:: Error for TryInsertError < Tbl > { }
220
+ impl < Tbl : Table > std:: error:: Error for TryInsertError < Tbl > {
221
+ fn source ( & self ) -> Option < & ( dyn std:: error:: Error + ' static ) > {
222
+ Some ( match self {
223
+ Self :: UniqueConstraintViolation ( e) => e,
224
+ Self :: AutoIncOverflow ( e) => e,
225
+ } )
226
+ }
227
+ }
221
228
222
229
impl < Tbl : Table > From < TryInsertError < Tbl > > for String {
223
230
fn from ( err : TryInsertError < Tbl > ) -> Self {
@@ -226,7 +233,7 @@ impl<Tbl: Table> From<TryInsertError<Tbl>> for String {
226
233
}
227
234
228
235
#[ doc( hidden) ]
229
- pub trait MaybeError < E = Self > : std:: error:: Error + Sized {
236
+ pub trait MaybeError < E = Self > : std:: error:: Error + Send + Sync + Sized + ' static {
230
237
fn get ( ) -> Option < Self > ;
231
238
}
232
239
You can’t perform that action at this time.
0 commit comments