@@ -254,7 +254,7 @@ impl IntoConnectParams for Url {
254254}
255255
256256/// Trait for types that can handle Postgres notice messages
257- pub trait PostgresNoticeHandler {
257+ pub trait NoticeHandler {
258258 /// Handle a Postgres notice message
259259 fn handle ( & mut self , notice : PostgresDbError ) ;
260260}
@@ -264,7 +264,7 @@ pub trait PostgresNoticeHandler {
264264/// This is the default handler used by a `PostgresConnection`.
265265pub struct DefaultNoticeHandler ;
266266
267- impl PostgresNoticeHandler for DefaultNoticeHandler {
267+ impl NoticeHandler for DefaultNoticeHandler {
268268 fn handle ( & mut self , notice : PostgresDbError ) {
269269 info ! ( "{}: {}" , notice. severity, notice. message) ;
270270 }
@@ -349,7 +349,7 @@ pub fn cancel_query<T>(params: T, ssl: &SslMode, data: PostgresCancelData)
349349struct InnerPostgresConnection {
350350 stream : BufferedStream < MaybeSslStream < InternalStream > > ,
351351 next_stmt_id : uint ,
352- notice_handler : Box < PostgresNoticeHandler +Send > ,
352+ notice_handler : Box < NoticeHandler +Send > ,
353353 notifications : RingBuf < PostgresNotification > ,
354354 cancel_data : PostgresCancelData ,
355355 unknown_types : HashMap < Oid , String > ,
@@ -507,8 +507,8 @@ impl InnerPostgresConnection {
507507 }
508508 }
509509
510- fn set_notice_handler ( & mut self , handler : Box < PostgresNoticeHandler +Send > )
511- -> Box < PostgresNoticeHandler +Send > {
510+ fn set_notice_handler ( & mut self , handler : Box < NoticeHandler +Send > )
511+ -> Box < NoticeHandler +Send > {
512512 mem:: replace ( & mut self . notice_handler , handler)
513513 }
514514
@@ -771,8 +771,7 @@ impl PostgresConnection {
771771 }
772772
773773 /// Sets the notice handler for the connection, returning the old handler.
774- pub fn set_notice_handler ( & self , handler : Box < PostgresNoticeHandler +Send > )
775- -> Box < PostgresNoticeHandler +Send > {
774+ pub fn set_notice_handler ( & self , handler : Box < NoticeHandler +Send > ) -> Box < NoticeHandler +Send > {
776775 self . conn . borrow_mut ( ) . set_notice_handler ( handler)
777776 }
778777
0 commit comments