@@ -300,7 +300,7 @@ pub struct PostgresNotifications<'conn> {
300300impl < ' conn > Iterator < PostgresNotification > for PostgresNotifications < ' conn > {
301301 /// Returns the oldest pending notification or `None` if there are none.
302302 ///
303- /// # Note
303+ /// ## Note
304304 ///
305305 /// `next` may return `Some` notification after returning `None` if a new
306306 /// notification was received.
@@ -330,7 +330,7 @@ pub struct PostgresCancelData {
330330/// Only the host and port of the connetion info are used. See
331331/// `PostgresConnection::connect` for details of the `params` argument.
332332///
333- /// # Example
333+ /// ## Example
334334///
335335/// ```rust,no_run
336336/// # use postgres::{PostgresConnection, NoSsl};
@@ -694,7 +694,7 @@ impl PostgresConnection {
694694 /// should be created manually and passed in. Note that Postgres does not
695695 /// support SSL over Unix sockets.
696696 ///
697- /// # Examples
697+ /// ## Examples
698698 ///
699699 /// ```rust,no_run
700700 /// # use postgres::{PostgresConnection, NoSsl};
@@ -759,7 +759,7 @@ impl PostgresConnection {
759759 /// The statement is associated with the connection that created it and may
760760 /// not outlive that connection.
761761 ///
762- /// # Example
762+ /// ## Example
763763 ///
764764 /// ```rust,no_run
765765 /// # use postgres::{PostgresConnection, NoSsl};
@@ -784,11 +784,11 @@ impl PostgresConnection {
784784 /// the connection for the duration of the transaction. The transaction
785785 /// is active until the `PostgresTransaction` object falls out of scope.
786786 ///
787- /// # Note
787+ /// ## Note
788788 /// A transaction will roll back by default. Use the `set_commit` method to
789789 /// set the transaction to commit.
790790 ///
791- /// # Example
791+ /// ## Example
792792 ///
793793 /// ```rust,no_run
794794 /// # use postgres::{PostgresConnection, NoSsl};
@@ -837,14 +837,14 @@ impl PostgresConnection {
837837 /// execution of batches of non-dynamic statements - for example, creation
838838 /// of a schema for a fresh database.
839839 ///
840- /// # Warning
840+ /// ## Warning
841841 ///
842842 /// Prepared statements should be used for any SQL statement which contains
843843 /// user-specified data, as it provides functionality to safely embed that
844844 /// data in the statment. Do not form statements via string concatenation
845845 /// and feed them into this method.
846846 ///
847- /// # Example
847+ /// ## Example
848848 ///
849849 /// ```rust,no_run
850850 /// # use postgres::{PostgresConnection, PostgresResult};
@@ -982,10 +982,11 @@ impl<'conn> PostgresTransaction<'conn> {
982982
983983 /// Like `PostgresConnection::batch_execute`.
984984 pub fn batch_execute ( & self , query : & str ) -> PostgresResult < ( ) > {
985- if self . conn . conn . borrow ( ) . trans_depth != self . depth {
985+ let mut conn = self . conn . conn . borrow_mut ( ) ;
986+ if conn. trans_depth != self . depth {
986987 return Err ( PgWrongTransaction ) ;
987988 }
988- self . conn . batch_execute ( query)
989+ conn. quick_query ( query) . map ( |_| ( ) )
989990 }
990991
991992 /// Like `PostgresConnection::transaction`.
@@ -1184,7 +1185,7 @@ impl<'conn> PostgresStatement<'conn> {
11841185 ///
11851186 /// If the statement does not modify any rows (e.g. SELECT), 0 is returned.
11861187 ///
1187- /// # Example
1188+ /// ## Example
11881189 ///
11891190 /// ```rust,no_run
11901191 /// # use postgres::{PostgresConnection, NoSsl};
@@ -1231,7 +1232,7 @@ impl<'conn> PostgresStatement<'conn> {
12311232 /// Executes the prepared statement, returning an iterator over the
12321233 /// resulting rows.
12331234 ///
1234- /// # Example
1235+ /// ## Example
12351236 ///
12361237 /// ```rust,no_run
12371238 /// # use postgres::{PostgresConnection, NoSsl};
@@ -1422,12 +1423,12 @@ impl<'stmt> PostgresRow<'stmt> {
14221423 /// A field can be accessed by the name or index of its column, though
14231424 /// access by index is more efficient. Rows are 0-indexed.
14241425 ///
1425- /// # Failure
1426+ /// ## Failure
14261427 ///
14271428 /// Fails if the index does not reference a column or the return type is
14281429 /// not compatible with the Postgres type.
14291430 ///
1430- /// # Example
1431+ /// ## Example
14311432 ///
14321433 /// ```rust,no_run
14331434 /// # use postgres::{PostgresConnection, NoSsl};
0 commit comments