@@ -199,7 +199,7 @@ impl IntoConnectParams for Url {
199199}
200200
201201/// Trait for types that can handle Postgres notice messages
202- pub trait NoticeHandler {
202+ pub trait NoticeHandler : Send {
203203 /// Handle a Postgres notice message
204204 fn handle ( & mut self , notice : DbError ) ;
205205}
@@ -375,7 +375,7 @@ pub fn cancel_query<T>(params: T, ssl: &SslMode, data: CancelData)
375375struct InnerConnection {
376376 stream : BufferedStream < MaybeSslStream < InternalStream > > ,
377377 next_stmt_id : uint ,
378- notice_handler : Box < NoticeHandler + Send > ,
378+ notice_handler : Box < NoticeHandler > ,
379379 notifications : RingBuf < Notification > ,
380380 cancel_data : CancelData ,
381381 unknown_types : HashMap < Oid , String > ,
@@ -534,7 +534,7 @@ impl InnerConnection {
534534 }
535535 }
536536
537- fn set_notice_handler ( & mut self , handler : Box < NoticeHandler + Send > ) -> Box < NoticeHandler + Send > {
537+ fn set_notice_handler ( & mut self , handler : Box < NoticeHandler > ) -> Box < NoticeHandler > {
538538 mem:: replace ( & mut self . notice_handler , handler)
539539 }
540540
@@ -797,7 +797,7 @@ impl Connection {
797797 }
798798
799799 /// Sets the notice handler for the connection, returning the old handler.
800- pub fn set_notice_handler ( & self , handler : Box < NoticeHandler + Send > ) -> Box < NoticeHandler + Send > {
800+ pub fn set_notice_handler ( & self , handler : Box < NoticeHandler > ) -> Box < NoticeHandler > {
801801 self . conn . borrow_mut ( ) . set_notice_handler ( handler)
802802 }
803803
0 commit comments