File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ use message::FrontendMessage::*;
1616
1717enum StatementContainer < ' a > {
1818 Borrowed ( & ' a Statement < ' a > ) ,
19+ Owned ( Statement < ' a > ) ,
1920}
2021
2122impl < ' a > Deref for StatementContainer < ' a > {
@@ -24,6 +25,7 @@ impl<'a> Deref for StatementContainer<'a> {
2425 fn deref ( & self ) -> & Statement < ' a > {
2526 match * self {
2627 StatementContainer :: Borrowed ( s) => s,
28+ StatementContainer :: Owned ( ref s) => s,
2729 }
2830 }
2931}
Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ FROM (SELECT gs.i
385385 Err ( Error :: DbError ( ref e) ) if e. code ( ) == & CardinalityViolation => { }
386386 Err ( err) => panic ! ( "Unexpected error {:?}" , err) ,
387387 Ok ( _) => panic ! ( "Expected failure" ) ,
388- }
388+ } ;
389389}
390390
391391#[ test]
@@ -751,7 +751,7 @@ fn test_execute_copy_from_err() {
751751 Err ( Error :: DbError ( ref err) ) if err. message ( ) . contains ( "COPY" ) => { }
752752 Err ( err) => panic ! ( "Unexpected error {:?}" , err) ,
753753 _ => panic ! ( "Expected error" ) ,
754- }
754+ } ;
755755}
756756
757757#[ test]
@@ -810,7 +810,7 @@ fn test_query_copy_out_err() {
810810 Ok ( _) => panic ! ( "unexpected success" ) ,
811811 Err ( Error :: IoError ( ref e) ) if e. to_string ( ) . contains ( "COPY" ) => { }
812812 Err ( e) => panic ! ( "unexpected error {:?}" , e) ,
813- }
813+ } ;
814814}
815815
816816#[ test]
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ fn test_slice_wrong_type() {
219219 Ok ( _) => panic ! ( "Unexpected success" ) ,
220220 Err ( Error :: WrongType ( ..) ) => { }
221221 Err ( e) => panic ! ( "Unexpected error {:?}" , e) ,
222- }
222+ } ;
223223}
224224
225225#[ test]
@@ -231,5 +231,5 @@ fn test_slice_range() {
231231 Ok ( _) => panic ! ( "Unexpected success" ) ,
232232 Err ( Error :: WrongType ( ..) ) => { }
233233 Err ( e) => panic ! ( "Unexpected error {:?}" , e) ,
234- }
234+ } ;
235235}
You can’t perform that action at this time.
0 commit comments