File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ pub enum ErrorPosition {
337
337
}
338
338
339
339
/// The kind of error that occurred.
340
- #[ derive( Debug , PartialEq ) ]
340
+ #[ derive( Debug , Clone , PartialEq ) ]
341
341
pub enum Kind {
342
342
/// An I/O error occurred.
343
343
Io ,
@@ -437,8 +437,8 @@ impl Error {
437
437
}
438
438
439
439
/// Returns the kind of this error.
440
- pub fn kind ( & self ) -> & Kind {
441
- & self . 0 . kind
440
+ pub fn kind ( & self ) -> Kind {
441
+ self . 0 . kind . clone ( )
442
442
}
443
443
444
444
/// Returns the source of this error if it was a `DbError`.
Original file line number Diff line number Diff line change @@ -949,7 +949,7 @@ async fn empty_query_one() {
949
949
assert ! ( res. is_err( ) ) ;
950
950
assert_eq ! (
951
951
res. err( ) . unwrap( ) . kind( ) ,
952
- & tokio_postgres:: error:: Kind :: RowCount
952
+ tokio_postgres:: error:: Kind :: RowCount
953
953
) ;
954
954
}
955
955
You can’t perform that action at this time.
0 commit comments