File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -267,11 +267,11 @@ pub struct CancelData {
267267/// thread::spawn(move || {
268268/// conn.execute("SOME EXPENSIVE QUERY", &[]).unwrap();
269269/// });
270- /// postgres::cancel_query(url, SslMode::None, cancel_data).unwrap();
270+ /// postgres::cancel_query(url, SslMode::None, & cancel_data).unwrap();
271271/// ```
272272pub fn cancel_query < T > ( params : T ,
273273 ssl : SslMode ,
274- data : CancelData )
274+ data : & CancelData )
275275 -> result:: Result < ( ) , ConnectError >
276276 where T : IntoConnectParams
277277{
Original file line number Diff line number Diff line change @@ -644,7 +644,7 @@ fn test_cancel_query() {
644644 let _t = thread:: spawn ( move || {
645645 thread:: sleep ( Duration :: from_millis ( 500 ) ) ;
646646 assert ! ( postgres:: cancel_query( "postgres://postgres@localhost" , SslMode :: None ,
647- cancel_data) . is_ok( ) ) ;
647+ & cancel_data) . is_ok( ) ) ;
648648 } ) ;
649649
650650 match conn. execute ( "SELECT pg_sleep(10)" , & [ ] ) {
You can’t perform that action at this time.
0 commit comments