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 {
337337}
338338
339339/// The kind of error that occurred.
340- #[ derive( Debug , PartialEq ) ]
340+ #[ derive( Debug , Clone , PartialEq ) ]
341341pub enum Kind {
342342 /// An I/O error occurred.
343343 Io ,
@@ -437,8 +437,8 @@ impl Error {
437437 }
438438
439439 /// 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 ( )
442442 }
443443
444444 /// 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() {
949949 assert ! ( res. is_err( ) ) ;
950950 assert_eq ! (
951951 res. err( ) . unwrap( ) . kind( ) ,
952- & tokio_postgres:: error:: Kind :: RowCount
952+ tokio_postgres:: error:: Kind :: RowCount
953953 ) ;
954954}
955955
You can’t perform that action at this time.
0 commit comments