Skip to content

Commit c71815c

Browse files
committed
Clean up example
1 parent fcedda9 commit c71815c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/lib/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ impl PostgresConnection {
851851
/// ```rust,no_run
852852
/// # use postgres::{PostgresConnection, PostgresResult};
853853
/// fn init_db(conn: &PostgresConnection) -> PostgresResult<()> {
854-
/// static INIT_DB: &'static str = "
854+
/// conn.batch_execute("
855855
/// CREATE TABLE person (
856856
/// id SERIAL PRIMARY KEY,
857857
/// name NOT NULL
@@ -864,8 +864,7 @@ impl PostgresConnection {
864864
/// );
865865
///
866866
/// CREATE INDEX ON purchase (time);
867-
/// ";
868-
/// conn.batch_execute(INIT_DB)
867+
/// ")
869868
/// }
870869
/// ```
871870
pub fn batch_execute(&self, query: &str) -> PostgresResult<()> {

0 commit comments

Comments
 (0)